Bug 95782 - [ppc64le] ICE in _cpp_pop_context
Summary: [ppc64le] ICE in _cpp_pop_context
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 10.1.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Keywords: ice-on-valid-code
Depends on:
Reported: 2020-06-20 06:26 UTC by Evan Nemerson
Modified: 2021-05-25 01:28 UTC (History)
1 user (show)

See Also:
Target: powerpc64le
Known to work:
Known to fail: 10.1.0, 9.3.0
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Evan Nemerson 2020-06-20 06:26:14 UTC
I'm running into an ICE on ppc64le:

  internal compiler error: in _cpp_pop_context, at libcpp/macro.c:2644

Here is a reproducer:

  #define a
  #define b(d) d
  #if defined(a)  
  b(vector double)

Just running `gcc -E test.c` when targeting ppc64le triggers the issue.  It happens with at least GCC 9 and 10.
Comment 1 Evan Nemerson 2021-05-25 01:28:06 UTC
This seems to also happen on s390x with -mzvector:

# s390x-linux-gnu-gcc-10 -march=z14 -mzvector -o test test.c
test.c:4:1: internal compiler error: in _cpp_pop_context, at libcpp/macro.c:2644
    4 | b(vector double)
      | ^
0x11da337 _cpp_pop_context
0x11dcd67 expand_arg
0x11dc41f replace_args
0x11dc41f enter_macro_context
0x11dc7e8 cpp_get_token_1
0x6393fe c_lex_with_flags(tree_node**, unsigned int*, unsigned char*, int)
0x5c96a5 c_lex_one_token
0x5f6517 c_parser_peek_token(c_parser*)
0x5f6517 c_parse_file()
0x64054b c_common_parse_file()
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.