-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from giulianobelinassi/fix_record_in_array_decl
Fix redeclaration of RecordDecl in Records defined in array variables
- Loading branch information
Showing
2 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* { dg-options "-DCE_EXTRACT_FUNCTIONS=f -DCE_NO_EXTERNALIZATION" }*/ | ||
|
||
static const struct mount_opts | ||
{ | ||
int token; | ||
int mount_opts; | ||
int flags; | ||
} ext4_mount_opts[] = { | ||
{1, 1, 1} | ||
}; | ||
|
||
int f(void) | ||
{ | ||
return ext4_mount_opts[0].token; | ||
} | ||
|
||
/* { dg-final { scan-tree-dump "static const struct mount_opts\n{\n *int token;\n *int mount_opts;\n *int flags;\n} ext4_mount_opts\[\] = {\n *{1, 1, 1}\n};" } } */ | ||
/* { dg-final { scan-tree-dump "return ext4_mount_opts\[0\]\.token;" } } */ |