aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr38661.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr38661.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr38661.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr38661.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr38661.c
new file mode 100644
index 000000000..5d243c6be
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr38661.c
@@ -0,0 +1,9 @@
+/* We used to ICE because we would wrap INT_MAX
+ into INT_MIN while doing the switch converison. */
+
+const char *func(int val) {
+ switch (val) {
+ case __INT_MAX__: return "foo";
+ default: return "";
+ }
+}