------- Additional Comments From fengwang at gcc dot gnu dot org 2005-07-05 08:39 ------- (In reply to comment #3) > "int4 nz.0 = -2;" look line an INIT_EXPR. It should be > > "int4 nz.0; > nz.0 = -2"
Shall we add an assignment explicitly? Just give an initial value. I don't think we should defer doing this when generate function codes. And another question, all the variables which have initial values are treat as static. Is this reasonable? Back to this topic, in fact, the error is not caused by nz.0. It is used to judge if we assign a target label. And the output is "Assigned label is not in the list". So it has passed the judgement of nz.0. >From the trees dumped, I found the CCP pass is wrong: $cat as.f.t22.ccp ;; Function MAIN__ (MAIN__) Removing basic block 3 Merging blocks 2 and 4 Merging blocks 2 and 5 MAIN__ () { void * gotovar.2; void * nz.1; int4 nz.0 = -2; int4 nz; <unnamed type> D.476; logical4 D.475; <bb 0>: nz.0_1 = -1; nz.1_2 = &__label_000093; D.475_3 = 0; D.476_4 = 0; if (D.476_4 != 0) goto <L0>; else goto <L1>; <L0>:; _gfortran_runtime_error ("Assigned label is not a target label", "as.f", 2); __label_000093:; <<<<<<<<<<<<<<<<<<<< Wrong here. <L1>:; _gfortran_runtime_error ("Assigned label is not in the list", "as.f", 2 return; } Before this pass, it it correct. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22290