'aka' printing shouldn't differ between in-tree and installed compilers due
to difference in whether libstdc++ headers are considered to be system
headers. The problem was that if we encounter a non-user-facing typedef
like __iter_type<T>, we stopped there instead of continuing to look through
typedefs to find the underlying user type.
PR c++/124621
gcc/c-family/ChangeLog:
* c-common.cc (user_facing_original_type_p): Recurse.
gcc/testsuite/ChangeLog:
* g++.dg/reflect/reflect_constant_array2.C: Add -D_GLIBCXX_SYSHDR.
if (!name_reserved_for_implementation_p (IDENTIFIER_POINTER (orig_id)))
return true;
+ if (typedef_variant_p (orig_type))
+ return user_facing_original_type_p (orig_type);
+
switch (TREE_CODE (orig_type))
{
/* Don't look through to an anonymous vector type, since the syntax
// { dg-do compile { target c++26 } }
-// { dg-additional-options "-freflection" }
+// Added _GLIBCXX_SYSHR to test c++/124621.
+// { dg-additional-options "-freflection -D_GLIBCXX_SYSHDR" }
// Test std::meta::reflect_constant_string.
#include <meta>