diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-20 15:50:23 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-20 15:50:23 +0000 |
commit | 594dfd1fb023ced9da0071e4c47c15bdcee120dc (patch) | |
tree | 29bacd4e39261b738d933dbede953fe1987c6824 /gcc/testsuite/gcc.dg/pr37171.c | |
parent | d39cadc692de4139b1cfaa05aa5fa4f1c713bba1 (diff) | |
download | gcc-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/gcc.dg/pr37171.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr37171.c | 19 |
1 files changed, 19 insertions, 0 deletions
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" } } */ |