https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67133

--- Comment #10 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Markus Trippelsdorf from comment #9)
> trippels@gcc2-power8 llvm_build % cat AnalysisConsumer.ii

It is also latent in r226635, just compile with options:

-O2 -fisolate-erroneous-paths-attribute


In this case, I cannot even debug it (i is 2):

(gdb) p gimple_call_arg (stmt, i)

/home/manuel/test3/pr67133.cc: In constructor ‘H::H()’:
/home/manuel/test3/pr67133.cc:43:1: internal compiler error: gimple check:
expected gimple_call(error_mark), have gimple_call() in gimple_call_arg, at
gimple.h:2858
 H::H() { *Out << a; }
 ^
0xa3d9c5 gimple_check_failed(gimple_statement_base const*, char const*, int,
char const*, gimple_code, tree_code)
        /home/manuel/test3/src/gcc/gimple.c:1154
0x5b3abd gimple_call_arg
        /home/manuel/test3/src/gcc/gimple.h:2858

But that is not the segmentation fault that is triggered when running the code
normally. It seems something wrong with the checking code.

If I print the stmt in the classic way (is there no better way to debug
gimple?):

(gdb) p *stmt
$5 = {code = GIMPLE_CALL, no_warning = 0, visited = 0, nontemporal_move = 0,
plf = 0, modified = 0, has_volatile_ops = 0, pad = 0, subcode = 0, uid = 11,
location = 2147483674, num_ops = 6, bb = 0x7ffff65bf340, next = 0x0, prev =
0x7ffff65a3b48}

Thus, it seems it should work?

Reply via email to