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
+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>
PR c++/87567 - constexpr rejects call to non-constexpr function.
exp = resolve_nondeduced_context (exp, complain);
/* peel back references, so they match. */
- type = non_reference (TREE_TYPE (exp));
+ type = non_reference (unlowered_expr_type (exp));
/* Peel off cv qualifiers. */
type = TYPE_MAIN_VARIANT (type);
+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>
* g++.dg/other/pr87574.C: New test.
--- /dev/null
+// 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 ();
+}