aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr90760.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr90760.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr90760.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr90760.c b/gcc/testsuite/gcc.dg/pr90760.c
new file mode 100644
index 00000000000..525a21a732f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr90760.c
@@ -0,0 +1,8 @@
+/* PR c/90760 */
+/* { dg-do compile } */
+/* { dg-require-named-sections "" } */
+
+void bar (void) {}
+void foo (void) __attribute__ ((alias ("bar"))); /* { dg-error "section of alias 'foo' must match section of its target" } */
+void foo (void) __attribute__ ((section ("baz")));
+void qux (void) __attribute__ ((alias ("bar"), section ("baz"))); /* { dg-error "section of alias 'qux' must match section of its target" } */