summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-20 15:50:23 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-20 15:50:23 +0000
commit594dfd1fb023ced9da0071e4c47c15bdcee120dc (patch)
tree29bacd4e39261b738d933dbede953fe1987c6824 /gcc/testsuite
parentd39cadc692de4139b1cfaa05aa5fa4f1c713bba1 (diff)
downloadgcc-594dfd1fb023ced9da0071e4c47c15bdcee120dc.tar.gz
PR c/37171
* c-parser.c (c_parser_attributes): For keywords use canonical spelling for attr_name. * gcc.dg/pr37171.c: New test. * g++.dg/ext/attrib34.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139317 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr37171.c19
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6144a4cb78d..bda7ff1766c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/37171
+ * gcc.dg/pr37171.c: New test.
+
2008-08-20 Arnaud Charlet <charlet@adacore.com>
* gnat.dg/div_no_warning.adb: New test.
diff --git a/gcc/testsuite/gcc.dg/pr37171.c b/gcc/testsuite/gcc.dg/pr37171.c
new file mode 100644
index 00000000000..9be44dfaffd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr37171.c
@@ -0,0 +1,19 @@
+/* PR c/37171 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+unsigned int f1 (void) __attribute__((const));
+unsigned int f2 (void) __attribute__((__const));
+unsigned int f3 (void) __attribute__((__const__));
+
+unsigned int f4 (void)
+{
+ return f1 () + f1 () + f1 () + f1 ()
+ + f2 () + f2 () + f2 () + f2 ()
+ + f3 () + f3 () + f3 () + f3 ();
+}
+
+/* { dg-final { scan-tree-dump-times "= f1 \\(\\)" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "= f2 \\(\\)" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "= f3 \\(\\)" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */