summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/attr-alias-4.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-07 00:32:37 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-07 00:32:37 +0000
commit9e830260e94660768c1afb379b85c1d941771589 (patch)
tree565bd86f7c66276a4fe50b4ebe612007ef76459a /gcc/testsuite/gcc.dg/attr-alias-4.c
parentfdd3cb8737c2b5b867c705eb5cb61605c80d9de2 (diff)
downloadgcc-9e830260e94660768c1afb379b85c1d941771589.tar.gz
PR c/35434
* c-common.c (handle_alias_attribute): Disallow attribute for anything not a FUNCTION_DECL or VAR_DECL. testsuite: * gcc.dg/attr-alias-4.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143998 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/attr-alias-4.c')
-rw-r--r--gcc/testsuite/gcc.dg/attr-alias-4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/attr-alias-4.c b/gcc/testsuite/gcc.dg/attr-alias-4.c
new file mode 100644
index 00000000000..fb15a20bf84
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/attr-alias-4.c
@@ -0,0 +1,4 @@
+/* ICE on invalid alias attribute: PR 35434. */
+/* { dg-do compile } */
+/* { dg-options "" } */
+typedef int i __attribute__((alias("j"))); /* { dg-warning "ignored" } */