diff options
author | dgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-29 21:41:38 +0000 |
---|---|---|
committer | dgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-29 21:41:38 +0000 |
commit | e8e0078cad7fb3aa6864da21bf46dcf8b77e2632 (patch) | |
tree | e5209d526d4831be4dd0f7323a5a1518da448340 /gcc | |
parent | 674e90bdec0dfb47ac0c9ddb257e752ee6237f04 (diff) | |
download | gcc-e8e0078cad7fb3aa6864da21bf46dcf8b77e2632.tar.gz |
2008-02-29 Douglas Gregor <doug.gregor@gmail.com>
PR c++/35315
* tree-inline.c (build_duplicate_type): When we make a
duplicate type, make it unique in the canonical types system.
2008-02-29 Douglas Gregor <doug.gregor@gmail.com>
PR c++/35315
* g++.dg/ext/attrib32.C: Add another test case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132779 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/attrib32.C | 11 | ||||
-rw-r--r-- | gcc/tree-inline.c | 2 |
4 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a3a554037ee..32be0ddd1e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-02-29 Douglas Gregor <doug.gregor@gmail.com> + + PR c++/35315 + * tree-inline.c (build_duplicate_type): When we make a + duplicate type, make it unique in the canonical types system. + 2008-02-29 Tom Tromey <tromey@redhat.com> * toplev.c (input_file_stack, input_file_stack_tick, fs_p, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 951afe1ab27..ff4c5608596 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-02-29 Douglas Gregor <doug.gregor@gmail.com> + + PR c++/35315 + * g++.dg/ext/attrib32.C: Add another test case. + 2008-02-29 Tom Tromey <tromey@redhat.com> * g++.dg/warn/pragma-system_header2.C: Ignore "included from" diff --git a/gcc/testsuite/g++.dg/ext/attrib32.C b/gcc/testsuite/g++.dg/ext/attrib32.C index 523015cb142..39363bb49d5 100644 --- a/gcc/testsuite/g++.dg/ext/attrib32.C +++ b/gcc/testsuite/g++.dg/ext/attrib32.C @@ -9,3 +9,14 @@ void bar() { foo(0); } + +typedef union U1 { int i; } U2 __attribute__((transparent_union)); + +static void foo2(U1) {} +static void foo2(U2) {} + +void bar2(U1 u1, U2 u2) +{ + foo2(u1); + foo2(u2); +} diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index ea0bac6214b..74895a82c93 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3723,5 +3723,7 @@ build_duplicate_type (tree type) pointer_map_destroy (id.decl_map); + TYPE_CANONICAL (type) = type; + return type; } |