This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/41758] [Cleanup] Don't resolve expr in gfc_match_allocate



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]