-
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.
SymbolExternalizer: Rename externalized operand of sizeof
Signed-off-by: Marcos Paulo de Souza <[email protected]>
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
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,17 @@ | ||
/* { dg-options "-DCE_EXTRACT_FUNCTIONS=pu_f -DCE_EXPORT_SYMBOLS=ee_o" }*/ | ||
|
||
#include <assert.h> | ||
|
||
static char ee_o[] = "123"; | ||
|
||
void pu_f(void) | ||
{ | ||
char s[sizeof(ee_o)]; | ||
char t[sizeof(ee_o)][sizeof(ee_o)]; | ||
static_assert(sizeof(s) == 4); | ||
static_assert(sizeof(t) == 16); | ||
ee_o; | ||
} | ||
|
||
/* { dg-final { scan-tree-dump "static char \(\*klpe_ee_o\)\[4\];" } } */ | ||
/* { dg-final { scan-tree-dump "char s\[sizeof\(\(\*klpe_ee_o\)\)\];" } } */ |