------- Comment #2 from burnus at gcc dot gnu dot org  2010-04-19 11:39 -------
Confirm. It fails with 4.5 and 4.6 using the option -fbounds-check (==
-fcheck-bounds), but only with -O2 and higher and for some reasons only with
-m32 and not with -m64 on x86_64-unknown-linux-gnu.

It works with GCC 4.1/4.2/4.3/4.4.

Valgrind shows:

==2634== Invalid read of size 2
==2634==    at 0x9643CA: is_overflow_infinity (tree-vrp.c:184)
==2634==    by 0x96447D: usable_range_p (tree-vrp.c:797)
==2634==    by 0x96A3DD: compare_ranges (tree-vrp.c:3388)
==2634==    by 0x96B083: vrp_evaluate_conditional_warnv_with_ops
(tree-vrp.c:5669)
==2634==    by 0x96B91F: vrp_evaluate_conditional (tree-vrp.c:5710)
==2634==    by 0x9309DE: thread_across_edge (tree-ssa-threadedge.c:537)
==2634==    by 0x9765ED: execute_vrp (tree-vrp.c:7214)
==2634==    by 0x785B9A: execute_one_pass (passes.c:1569)
==2634==    by 0x785E24: execute_pass_list (passes.c:1624)
==2634==    by 0x785E36: execute_pass_list (passes.c:1625)
==2634==    by 0x87AB34: tree_rest_of_compilation (tree-optimize.c:413)
==2634==    by 0x9FCA60: cgraph_expand_function (cgraphunit.c:1548)
==2634==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==2634==
test.f90: In function 'f06fkfn':
test.f90:1:0: internal compiler error: Segmentation fault
Please submit a full bug report,


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu dot
                   |                            |org
          Component|fortran                     |middle-end
 GCC target triplet|                            |i386-unknown-linux-gnu
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.5.0 4.6.0
      Known to work|                            |4.4.4
            Summary|ICE with -fcheck=all        |[4.5/4.6 Regression] ICE in
                   |                            |is_overflow_infinity (tree-
                   |                            |vrp.c:184) with gfortran -
                   |                            |fcheck=bounds -O2


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

Reply via email to