-
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: Make sure we pass a valid location when searching…
… identifiers Signed-off-by: Marcos Paulo de Souza <[email protected]>
- Loading branch information
1 parent
bb815fa
commit bfc113f
Showing
3 changed files
with
76 additions
and
27 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,22 @@ | ||
/* { dg-options "-DCE_EXTRACT_FUNCTIONS=f" }*/ | ||
|
||
// Same as macro-22.c but without rename symbols | ||
|
||
typedef __builtin_va_list __gnuc_va_list; | ||
extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); | ||
typedef __builtin_va_list va_list; | ||
|
||
#define va_start(ap, param) __builtin_va_start(ap, param) | ||
#define va_end(ap) __builtin_va_end(ap) | ||
#define __printf(a, b) __attribute__((__format__(printf, a, b))) | ||
|
||
__printf(1, 2) | ||
static void f(const char *fmt, ...) | ||
{ | ||
va_list args; | ||
va_start(args, fmt); | ||
vprintf (fmt, args); | ||
va_end(args); | ||
} | ||
|
||
/* { dg-final { scan-tree-dump "static void f" } } */ |
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,22 @@ | ||
/* { dg-options "-DCE_EXTRACT_FUNCTIONS=f -DCE_RENAME_SYMBOLS" }*/ | ||
|
||
// Same as macro-21.c but with rename symbols | ||
// | ||
typedef __builtin_va_list __gnuc_va_list; | ||
extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); | ||
typedef __builtin_va_list va_list; | ||
|
||
#define va_start(ap, param) __builtin_va_start(ap, param) | ||
#define va_end(ap) __builtin_va_end(ap) | ||
#define __printf(a, b) __attribute__((__format__(printf, a, b))) | ||
|
||
__printf(1, 2) | ||
static void f(const char *fmt, ...) | ||
{ | ||
va_list args; | ||
va_start(args, fmt); | ||
vprintf (fmt, args); | ||
va_end(args); | ||
} | ||
|
||
/* { dg-final { scan-tree-dump-not "static" } } */ |