aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/cpp/macro11.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/cpp/macro11.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/cpp/macro11.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/cpp/macro11.c b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/macro11.c
new file mode 100644
index 000000000..b131223b9
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/macro11.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc. */
+
+/* { dg-do preprocess } */
+
+/* Source: Neil Booth, 2 Oct 2001.
+
+ Tests that we clear the disabled flag that is set by the
+ macro-defined-to-itself optimization (the optimization might not be
+ worth it). */
+
+#define foo foo
+#undef foo
+#define foo 1
+#if !foo
+#error foo still disabled!
+#endif