diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/funcdef-attr-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/funcdef-attr-1.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/funcdef-attr-1.c b/gcc/testsuite/gcc.dg/funcdef-attr-1.c new file mode 100644 index 000000000..17249a0cb --- /dev/null +++ b/gcc/testsuite/gcc.dg/funcdef-attr-1.c @@ -0,0 +1,14 @@ +/* The declarator in a function definition should be able to take the + form of an attributed function declarator, not just a plain + function declarator. This was formerly allowed by some of the code + but then the wrong constraint checks were made because other code + didn't recognise the declarator as being that of the function + definition. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk>. */ + +int (__attribute__((const)) x) (a, b) + int a; + int b; +{ + return a + b; +} |