Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions regression/ansi-c/gcc_attributes10/main.c
Original file line number Diff line number Diff line change
@@ -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;
}
8 changes: 8 additions & 0 deletions regression/ansi-c/gcc_attributes10/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CORE
main.c

^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
^CONVERSION ERROR$
2 changes: 1 addition & 1 deletion regression/ansi-c/gcc_attributes5/test.desc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
KNOWNBUG
CORE
main.c

^EXIT=0$
Expand Down
2 changes: 1 addition & 1 deletion src/ansi-c/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,7 @@ gcc_attribute_list:
gcc_attribute
| gcc_attribute_list ',' gcc_attribute
{
$$=merge($1, $2);
$$=merge($1, $3);
}
;

Expand Down