aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/enum8.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/enum8.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/enum8.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/enum8.C b/gcc/testsuite/g++.old-deja/g++.jason/enum8.C
new file mode 100644
index 00000000000..811b44cf29b
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/enum8.C
@@ -0,0 +1,20 @@
+// Bug: the switch fails on the Alpha because folding ef - 1 fails.
+
+enum foo { one=1, thirty=30 };
+
+int f (enum foo ef)
+{
+ switch (ef)
+ {
+ case one:
+ case thirty:
+ return 0;
+ default:
+ return 1;
+ }
+}
+
+main ()
+{
+ return f (one);
+}