https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90574
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code, wrong-debug
Status|UNCONFIRMED |NEW
Last reconfirmed| |2019-05-23
CC| |rguenth at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
We somehow build a broken(?) CFG from the start:
;; basic block 2, loop depth 0
;; pred: ENTRY
if (argc == 0)
;; succ: 3
;; basic block 3, loop depth 0
;; pred: 2
label:
if (argc == 1)
goto <bb 4>; [INV]
else
goto <bb 5>; [INV]
see how BB2 only has a single outgoing edge. CFG cleanup fixes this for us.
.gimple has
[t.c:2:1] {
void label = <<< error >>>;
[t.c:3:6] if (argc == 0) goto <D.1912>; else goto <D.1913>;
<D.1912>:
[t.c:4:5] {
int * ptr;
[t.c:6:1] label:
}
<D.1913>:
[t.c:10:6] if (argc == 1) goto <D.1914>; else goto <D.1915>;
so that looks good, likewise .lower:
[t.c:3:6] if (argc == 0) goto <D.1912>; else goto <D.1913>;
<D.1912>:
[t.c:6:1] label:
<D.1913>:
[t.c:10:6] if (argc == 1) goto <D.1914>; else goto <D.1915>;
iff we'd elide an empty block as having no side-effects we would have
deleted the label.
Thus confirmed as CFG build bug.