[Bug middle-end/4210] should not warn in dead code

2020-06-05 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 --- Comment #43 from Marc Glisse --- (In reply to Niels Möller from comment #42) > And what's the easiest way to run the the right compiler process (I guess > that's cc1) under gdb? gcc -c t.c -wrapper gdb,--args

[Bug middle-end/4210] should not warn in dead code

2020-06-04 Thread nisse at lysator dot liu.se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 --- Comment #42 from Niels Möller --- Created attachment 48678 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48678&action=edit Add a new pass for emitting the warning (not working) Since adding a new pass seems to be the right way, I've gi

[Bug middle-end/4210] should not warn in dead code

2020-05-06 Thread nisse at lysator dot liu.se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 --- Comment #41 from Niels Möller --- (In reply to Manuel López-Ibáñez from comment #39) > You can easily find which pass does something by dumping (-ftree-dump-*) > all of them and comparing them. It's -ftree-dump-all, and also -fdump-passes wa

[Bug middle-end/4210] should not warn in dead code

2020-05-06 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org --- Comment

[Bug middle-end/4210] should not warn in dead code

2020-05-06 Thread lopezibanez at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 --- Comment #39 from Manuel López-Ibáñez --- I think these questions are more appropriate for the mailing list, since few people are subscribed to this bug. You can easily find which pass does something by dumping (-ftree-dump-*) all of them and

[Bug middle-end/4210] should not warn in dead code

2020-05-06 Thread nisse at lysator dot liu.se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 --- Comment #38 from Niels Möller --- Just a brief update. 1. Tried adding fprintf warnings to c_gimplify_expr (btw, what's the right way to display a pretty warning with line numbers etc in later passes?). But it seems that's too early, I still

[Bug middle-end/4210] should not warn in dead code

2020-05-05 Thread nisse at lysator dot liu.se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 --- Comment #37 from Niels Möller --- (In reply to Manuel López-Ibáñez from comment #35) > There is no such place. Dead code is identified in the middle-end and by > then, there is no parse tree, only GIMPLE and SSA: > https://gcc.gnu.org/onlinedo

[Bug middle-end/4210] should not warn in dead code

2020-05-05 Thread nisse at lysator dot liu.se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 --- Comment #36 from Niels Möller --- (In reply to Martin Sebor from comment #34) > > The front ends can eliminate simple subexpressions (as in '0 ? x >> 32 : x > >> 1') but they don't do the same for statements. Moving the warning from > the fr

[Bug middle-end/4210] should not warn in dead code

2020-05-05 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 --- Comment #35 from Manuel López-Ibáñez --- (In reply to Niels Möller from comment #32) > 1. There's similar code in c_fully_fold_internal, in gcc/c/c-fold.c, close > to line 400. But that code does *not* emit any warning for the example > above,

[Bug middle-end/4210] should not warn in dead code

2020-05-05 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 Martin Sebor changed: What|Removed |Added Summary|should not warning with |should not warn in dead