diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.dg/pr28574.c | |
download | cbb-gcc-4.6.4-15d2061ac0796199866debe9ac87130894b0cdd3.tar.bz2 cbb-gcc-4.6.4-15d2061ac0796199866debe9ac87130894b0cdd3.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr28574.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr28574.c | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr28574.c b/gcc/testsuite/gcc.dg/pr28574.c new file mode 100644 index 000000000..f5ff6c01d --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr28574.c @@ -0,0 +1,74 @@ +/* On IA64 This test resulted in a missing jumptable and an undefined + reference to a label. Make sure we can compile and link it with + no undefs at -O2. */ + +/* { dg-do link } */ +/* { dg-options "-O2" } */ + +typedef enum yasm_module_type { + YASM_MODULE_ARCH = 0, + YASM_MODULE_DBGFMT, + YASM_MODULE_OBJFMT, + YASM_MODULE_LISTFMT, + YASM_MODULE_OPTIMIZER +} yasm_module_type; + +struct yasm_module { + const char *name; +}; + +typedef struct yasm_module yasm_arch_module; +typedef struct yasm_module yasm_dbgfmt_module; +typedef struct yasm_module yasm_objfmt_module; +typedef struct yasm_module yasm_listfmt_module; +typedef struct yasm_module yasm_optimizer_module; + +typedef struct module { + void *data; +} module; + +static struct { + module *m; + int n; +} module_types[] = { + {}, +}; + +void +yasm_list_modules(yasm_module_type type, + void (*printfunc) (const char *name)) +{ + int i; + module *modules = module_types[type].m; + yasm_arch_module *arch; + yasm_dbgfmt_module *dbgfmt; + yasm_objfmt_module *objfmt; + yasm_listfmt_module *listfmt; + yasm_optimizer_module *optimizer; + + for (i=0; i<2; i++) { + switch (type) { + case YASM_MODULE_ARCH: + arch = modules[i].data; + printfunc(arch->name); + break; + case YASM_MODULE_DBGFMT: + dbgfmt = modules[i].data; + printfunc(dbgfmt->name); + break; + case YASM_MODULE_OBJFMT: + objfmt = modules[i].data; + printfunc(objfmt->name); + break; + case YASM_MODULE_LISTFMT: + listfmt = modules[i].data; + printfunc(listfmt->name); + break; + case YASM_MODULE_OPTIMIZER: + optimizer = modules[i].data; + printfunc(optimizer->name); + } + } +} + +main() {} |