aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Frontend/fixed_point_as_variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Frontend/fixed_point_as_variables.c')
-rw-r--r--clang/test/Frontend/fixed_point_as_variables.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Frontend/fixed_point_as_variables.c b/clang/test/Frontend/fixed_point_as_variables.c
new file mode 100644
index 0000000..1eb969a
--- /dev/null
+++ b/clang/test/Frontend/fixed_point_as_variables.c
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -x c -verify %s
+// RUN: %clang_cc1 -x c -verify %s -ffixed-point -DFIXED_POINT=1
+
+int _Accum;
+
+#ifdef FIXED_POINT
+// expected-error@4{{cannot combine with previous 'int' declaration specifier}}
+// expected-warning@4{{declaration does not declare anything}}
+#else
+// expected-no-diagnostics
+#endif