When running gfortran gfortran.dg/allocate_alloc_opt_9.f90 I get an ICE with
  free_expr0(): Bad expr type

That happens for the second call to gfc_match_allocate and the ICE happens via
gfc_match_allocate (match.c:309) -> gfc_free_expr

valgrind writes:
        ==2974== Invalid read of size 4
        ==2974== at 0x508BC9: gfc_match_allocate (match.c:3098)
        ==2974== by 0x518FA9: match_word (parse.c:65)
        ==2974== by 0x519EFC: decode_statement (parse.c:332)

If one prints the value of tmp and tmp->expr_type, one gets tmp != NULL and
expr_type == 1549556828 ...

Daniel checked 4.5.0 and found the same valgrind error.


-- 
           Summary: gfortran.dg/allocate_alloc_opt_9.f90: Segfault due to
                    invalid FREE
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to