[Bug fortran/41758] [Cleanup] Don't resolve expr in gfc_match_allocate
kargl at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Oct 19 22:29:00 GMT 2009
------- Comment #2 from kargl at gcc dot gnu dot org 2009-10-19 22:29 -------
Note, simply commenting out gfc_resolve_expr() leads to regressions
in allocate_alloc_opt_4.f90 and allocate_alloc_opt_6.f90. The reduce
testcase from *_4.f90 is
! { dg-do compile }
program a
implicit none
integer m(3,3)
integer, allocatable :: i(:)
m = 42
allocate(i(4), source=m) ! { dg-error "must be scalar or have the same rank"
}
end program a
which means this chunk of code in gfc_match_allocate isn't triggering.
/* Check C632 and restriction following Note 6.18. */
if (tmp->rank > 0 && conformable_arrays (tmp, head->expr) == FAILURE)
goto cleanup;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41758
More information about the Gcc-bugs
mailing list