re PR c++/87547 (G++ reports bad type names for bit-field members)
PR c++/87547 * rtti.c (get_tinfo_decl_dynamic): Use unlowered_expr_type instead of TREE_TYPE. * g++.dg/rtti/typeid12.C: New test. From-SVN: r265033
This commit is contained in:
parent
6b0649cba3
commit
f7904392b7
@ -1,3 +1,9 @@
|
|||||||
|
2018-10-11 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c++/87547
|
||||||
|
* rtti.c (get_tinfo_decl_dynamic): Use unlowered_expr_type instead
|
||||||
|
of TREE_TYPE.
|
||||||
|
|
||||||
2018-10-10 Marek Polacek <polacek@redhat.com>
|
2018-10-10 Marek Polacek <polacek@redhat.com>
|
||||||
|
|
||||||
PR c++/87567 - constexpr rejects call to non-constexpr function.
|
PR c++/87567 - constexpr rejects call to non-constexpr function.
|
||||||
|
@ -273,7 +273,7 @@ get_tinfo_decl_dynamic (tree exp, tsubst_flags_t complain)
|
|||||||
exp = resolve_nondeduced_context (exp, complain);
|
exp = resolve_nondeduced_context (exp, complain);
|
||||||
|
|
||||||
/* peel back references, so they match. */
|
/* peel back references, so they match. */
|
||||||
type = non_reference (TREE_TYPE (exp));
|
type = non_reference (unlowered_expr_type (exp));
|
||||||
|
|
||||||
/* Peel off cv qualifiers. */
|
/* Peel off cv qualifiers. */
|
||||||
type = TYPE_MAIN_VARIANT (type);
|
type = TYPE_MAIN_VARIANT (type);
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2018-10-11 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c++/87547
|
||||||
|
* g++.dg/rtti/typeid12.C: New test.
|
||||||
|
|
||||||
2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
|
2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* g++.dg/other/pr87574.C: New test.
|
* g++.dg/other/pr87574.C: New test.
|
||||||
|
16
gcc/testsuite/g++.dg/rtti/typeid12.C
Normal file
16
gcc/testsuite/g++.dg/rtti/typeid12.C
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// PR c++/87547
|
||||||
|
// { dg-do run }
|
||||||
|
|
||||||
|
#include <typeinfo>
|
||||||
|
|
||||||
|
struct S { unsigned int a : 4; unsigned int b : 12; int c; unsigned long d : 8; } s;
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if (typeid (s.a) != typeid (unsigned int)
|
||||||
|
|| typeid (s.b) != typeid (unsigned int)
|
||||||
|
|| typeid (s.c) != typeid (int)
|
||||||
|
|| typeid (s.d) != typeid (unsigned long))
|
||||||
|
__builtin_abort ();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user