------- Comment #8 from manu at gcc dot gnu dot org  2008-02-01 16:28 -------
(In reply to comment #6)
> Here is what happens (note that, differently from what was the case, now the
> warning is give three times in a row):


The "is used" warning is the same issue with virtual operands. The relevant
part is this:

  # BLOCK 4, starting at line 3675
  # PRED: 3 (true)
  # LOADS:  { zD.189596 }
  [bug.cc : 3675] z.1883D.189607_8 = zD.189596;
  [bug.cc : 3675] *toD.188165_6(D) ={v} z.1883D.189607_8;
  [bug.cc : 3676] D.189608_9 = rD.189597_4;
  [bug.cc : 3676] goto <bb 10>;
  # SUCC: 10 (fallthru)

We see that zD.189596 has an empty definition, which is wrong since it has been
passed by reference in a previous BB. Again, it won't be fixed until we teach
Wuninitialized about VOPS.


The "may be used" warnings appear after applying inline, so we end up with
something like:

  # BLOCK 25 freq:10000, starting at line 3670
  # PRED: 3 [100.0%]  (fallthru,exec) 6 [33.0%]  (false,exec) 7 [100.0%] 
(fallthru,exec) 8 [100.0%]  (fallthru,exec) 12 [33.0%]  (false,exec) 13
[100.0%]  (fallthru,ex\
ec) 15 [69.0%]  (false,exec) 16 [100.0%]  (fallthru,exec) 19 [33.0%] 
(false,exec) 20 [100.0%]  (fallthru,exec) 22 [69.0%]  (false,exec) 23 [100.0%] 
(fallthru,exec) 24\
 [100.0%]  (fallthru,exec)
  # zD.203060_41 = PHI <zD.203060_58(3), zD.203060_50(D)(6), zD.203060_51(7),
zD.203060_52(8), zD.203060_50(D)(12), zD.203060_53(13), zD.203060_50(D)(15),
zD.203060_54(\
16), zD.203060_50(D)(19), zD.203060_55(20), zD.203060_50(D)(22),
zD.203060_56(23), zD.203060_57(24)>
  # D.222111_38 = PHI <4(3), 33(6), 2(7), 4(8), 33(12), 2(13), 18(15), 1(16),
33(19), 2(20), 18(22), 1(23), 4(24)>
  D.222156_40 = D.222111_38;
  [bug.cc : 3670] rD.203116_7 = D.222156_40;
  [bug.cc : 3671] r.1882D.203125_9 = (intD.2) rD.203116_7;
  [bug.cc : 3671] switch (r.1882D.203125_9)


Whether that is a correct PHI, I cannot tell because the testcase is too huge
for me to understand how that happened. Yet, we should not be warning for each
PHI operand, at a minimum. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33802

Reply via email to