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

           Summary: ICE: SIGSEGV in is_gimple_min_invariant
                    (gimple.c:2742) with -fno-tree-ccp
                    -fno-tree-dominator-opts -fno-tree-fre
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: zso...@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 22788
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22788
reduced testcase (from subref_array_pointer_2.f90)

Compiler output - 4.6:
$ gcc -O -ftree-pre -ftree-vrp -fno-tree-ccp -fno-tree-dominator-opts
-fno-tree-fre pr46985.f90
==26346== Invalid read of size 2
==26346==    at 0x7A25D0: is_gimple_min_invariant (gimple.c:2742)
==26346==    by 0x9AFD7D: instantiate_scev_r (tree-scalar-evolution.c:2620)
==26346==    by 0x9AFECE: instantiate_scev_r (tree-scalar-evolution.c:2510)
==26346==    by 0x9B07D9: instantiate_scev_r (tree-scalar-evolution.c:2583)
==26346==    by 0x9AFFDC: instantiate_scev_r (tree-scalar-evolution.c:2255)
==26346==    by 0x9B130A: resolve_mixers (tree-scalar-evolution.c:2744)
==26346==    by 0x9B1508: analyze_scalar_evolution_in_loop
(tree-scalar-evolution.c:2052)
==26346==    by 0x9B202F: simple_iv (tree-scalar-evolution.c:3184)
==26346==    by 0x10B5EFB: constant_after_peeling (tree-ssa-loop-ivcanon.c:184)
==26346==    by 0x10B65CD: canonicalize_loop_induction_variables
(tree-ssa-loop-ivcanon.c:244)
==26346==    by 0x10B70BE: tree_unroll_loops_completely
(tree-ssa-loop-ivcanon.c:536)
==26346==    by 0x84FC95: execute_one_pass (passes.c:1553)
==26346==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==26346== 
pr46985.f90: In function 'main':
pr46985.f90:7:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Compiler output - 4.5 and 4.4:
$ gcc -ftree-pre -ftree-vrp -O -fno-tree-ccp -fno-tree-dominator-opts
-fno-tree-fre pr46985.f90 
pr46985.f90: In function 'MAIN__':
pr46985.f90:7:0: internal compiler error: in analyze_function, at
ipa-reference.c:731
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Doesn't ICE with release checking.

Tested revisions:
r167954 - crash
4.5 r166509 - different crash
4.4 r166509 - different crash

Reply via email to