aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/const-eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/const-eval.c')
-rw-r--r--test/Sema/const-eval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Sema/const-eval.c b/test/Sema/const-eval.c
index df56b06e48..c984f5bf84 100644
--- a/test/Sema/const-eval.c
+++ b/test/Sema/const-eval.c
@@ -95,3 +95,7 @@ int intLvalue[*(int*)((long)&n ?: 1)] = { 1, 2 }; // expected-error {{variable l
union u { int a; char b[4]; };
char c = ((union u)(123456)).b[0]; // expected-error {{not a compile-time constant}}
+
+extern const int weak_int __attribute__((weak));
+const int weak_int = 42;
+int weak_int_test = weak_int; // expected-error {{not a compile-time constant}}