Hi, How SSA inlining and default defs for uninitialized variables are supposed to interact? Suppose you have the following situation
BB0 ... | \ (ab) | BB1 s_2 = f(s_1(D)) | / BB2 s_3 = PHI <s_1(D), s2> in a function that gets inlined into a loop. The liveness of s_1(D) in BB0 will propagate to BB2 along the backwards edge and you get overlapping live ranges for s_1(D) and s_3. If s_1(D) is SSA_NAME_OCCURS_IN_ABNORMAL_PHI, the compilation will abort during SSA coalescing because they must be coalesced. This is on the mainline, Ada testcase attached, run 'gnatchop' on it and compile at -O -gnatp. Thanks in advance. -- Eric Botcazou
package Q is procedure Read(S : out Integer); procedure Restore(S : in out Integer); end Q; package P is type Int_Ptr is access all Integer; procedure Exec(P : Int_Ptr); end P; with Q; use Q; package body P is procedure Lock is S : Integer; begin Read(S); Restore(S); exception when others => Restore(S); end; procedure Exec(P : Int_Ptr) is begin while P /= NULL loop Lock; end loop; end; end P;