Re: [patch, Fortran] Fix PR 106546, inline matmul with -fno-automatic
Jerry D <[email protected]>
| Newsgroups | gmane.comp.gcc.patches,gmane.comp.gcc.fortran |
|---|---|
| Message-ID | <[email protected]> |
On 5/20/26 10:33 AM, Thomas Koenig wrote: > Hello world, > > the below patch solves a PR (a regression if you just count -O) > by setting the AUTOMATIC flag on all variables generated > by the front end. > > OK for trunk and backport? Yes, thanks Thomas. Best regards, Jerry > > Best regards > > Thomas > > PR fortran/106546 - inline matmul with -fno-automatic > > There was a problem caused with allocatable arrays used for > front-end optimization when -fno-automatic was specified. > Solved by explicitly setting the automatic attribute on the > symbol. It required "-O2 -fcheck=bounds -fno-automatic" > to be seen. > > gcc/fortran/ChangeLog: > > PR fortran/106546 > * frontend-passes.cc (create_var): Set attr->automatic on > new symbol. > (create_do_loop): Likewise on iteration variable. > > gcc/testsuite/ChangeLog: > > PR fortran/106546 > * gfortran.dg/inline_matmul_27.f90: New test.