diff --git a/regression/ansi-c/gcc_attributes10/main.c b/regression/ansi-c/gcc_attributes10/main.c new file mode 100644 index 00000000000..cf52787176e --- /dev/null +++ b/regression/ansi-c/gcc_attributes10/main.c @@ -0,0 +1,19 @@ +#define STATIC_ASSERT(condition) \ + int array##__LINE__[(condition) ? 1 : -1] + +#ifdef __GNUC__ + +int x __attribute__ ((__vector_size__ (12), __may_alias__)); +int x2 __attribute__ ((__may_alias__)); +int x3 __attribute__ ((__may_alias__, __vector_size__ (12))); + +STATIC_ASSERT(sizeof(x)==12); +STATIC_ASSERT(sizeof(x2)==sizeof(int)); +STATIC_ASSERT(sizeof(x3)==12); + +#endif + +int main(int argc, char* argv[]) +{ + return 0; +} diff --git a/regression/ansi-c/gcc_attributes10/test.desc b/regression/ansi-c/gcc_attributes10/test.desc new file mode 100644 index 00000000000..466da18b2b5 --- /dev/null +++ b/regression/ansi-c/gcc_attributes10/test.desc @@ -0,0 +1,8 @@ +CORE +main.c + +^EXIT=0$ +^SIGNAL=0$ +-- +^warning: ignoring +^CONVERSION ERROR$ diff --git a/regression/ansi-c/gcc_attributes5/test.desc b/regression/ansi-c/gcc_attributes5/test.desc index fc2b1874059..466da18b2b5 100644 --- a/regression/ansi-c/gcc_attributes5/test.desc +++ b/regression/ansi-c/gcc_attributes5/test.desc @@ -1,4 +1,4 @@ -KNOWNBUG +CORE main.c ^EXIT=0$ diff --git a/src/ansi-c/parser.y b/src/ansi-c/parser.y index 0819265fe70..bddccced310 100644 --- a/src/ansi-c/parser.y +++ b/src/ansi-c/parser.y @@ -1545,7 +1545,7 @@ gcc_attribute_list: gcc_attribute | gcc_attribute_list ',' gcc_attribute { - $$=merge($1, $2); + $$=merge($1, $3); } ;