This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix C/51321, ICE With incomplete types with __builtin_types_compatible_p


Hi,
  The problem here is that right after groktypename we take the
TYPE_MAIN_VARIANT of the result which is incorrect.  There needs a
check for error_mark_node.  This adds the obvious check and fixes the
ICE.

OK?  Bootstrapped and tested on x86_64-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
* c-parser.c (c_parser_postfix_expression): Check groktypename results
before looking at the main variant.

testsuite/ChangeLog:
* testsuite/gcc.dg/pr51321.c: New testcase


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]