diff options
author | Richard Henderson <rth@redhat.com> | 2004-01-28 20:32:10 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2004-01-28 20:32:10 +0000 |
commit | 0730c13e6a0dcf43fd63077905139bda00617d6f (patch) | |
tree | 2b4b44d88ec5c4c9f8327a35a4a281a6ff492691 /gcc/testsuite/g++.dg | |
parent | 008109459d8c0e750c0379a40b1ea590868d418d (diff) |
PR middle-end/13898
* gimplify.c (gimplify_init_constructor): Invoke
lhd_set_decl_assembler_name on the now-static variable.
* g++.dg/opt/static4.C: New.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@76806 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/opt/static4.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/opt/static4.C b/gcc/testsuite/g++.dg/opt/static4.C new file mode 100644 index 00000000000..87e11b02756 --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/static4.C @@ -0,0 +1,15 @@ +// PR 13898 +// Make sure the two X variables get assigned unique assembler names +// if they are promoted to static storage. + +// { dg-do compile } + +int g(int i) { + if (i<1) { + const int x[3] = { 1,2,3 }; + return x[i]; + } else { + const int x[3] = { 4,5,6 }; + return x[i]; + } +} |