c++: ICE with bad definition of decimal32 [PR100261]
authorJason Merrill <jason@redhat.com>
Tue, 18 May 2021 21:15:42 +0000 (17:15 -0400)
committerJason Merrill <jason@redhat.com>
Wed, 19 May 2021 00:26:47 +0000 (20:26 -0400)
commit01b2864757540d24c4e717a77b40b29369c064b2
tree78a80919757d43aa37a5c6cdc1f630b3208b4e32
parent061fe8c58ac4d436906a404f7fb46b0a6e0d7b4f
c++: ICE with bad definition of decimal32 [PR100261]

The change to only look at the global binding for non-classes meant that
here, when dealing with decimal32 which is magically mangled like its first
non-static data member, we got a collision with the mangling for float.
Fixed by also looking up an existing binding for such magical classes.

PR c++/100261

gcc/cp/ChangeLog:

* rtti.c (get_tinfo_decl_direct): Check TYPE_TRANSPARENT_AGGR.

gcc/testsuite/ChangeLog:

* g++.dg/dfp/mangle-6.C: New test.
gcc/cp/rtti.c
gcc/testsuite/g++.dg/dfp/mangle-6.C [new file with mode: 0644]