Message ID | 3666129.0IVxUXv0u3@andrew-precision-3520 |
---|---|
State | New |
Headers | show |
Series | module_column not initialized in write_module() | expand |
Hi Andrew, > Fixing this seems to be simple: > > --- gcc/fortran/module.c (revision 270772) > +++ gcc/fortran/module.c (working copy) > @@ -6052,6 +6052,9 @@ write_module (void) > { > int i; > > + /* Initialize the column counter. */ > + module_column = 1; > + > /* Write the operator interfaces. */ > mio_lparen (); > > This causes no regressions. I've attached the patch including the ChangeLog - > is this ok to commit? OK for trunk. Thanks a lot for the patch! Regards Thomas
Thanks Thomas, committed as r270777. On Wednesday, May 1, 2019 9:35:13 PM PDT Thomas Koenig wrote: > Hi Andrew, > > > Fixing this seems to be simple: > > > > --- gcc/fortran/module.c (revision 270772) > > +++ gcc/fortran/module.c (working copy) > > @@ -6052,6 +6052,9 @@ write_module (void) > > > > { > > > > int i; > > > > + /* Initialize the column counter. */ > > + module_column = 1; > > + > > > > /* Write the operator interfaces. */ > > mio_lparen (); > > > > This causes no regressions. I've attached the patch including the > > ChangeLog - is this ok to commit? > > OK for trunk. > > Thanks a lot for the patch! > > Regards > > Thomas
Index: gcc/fortran/ChangeLog =================================================================== --- gcc/fortran/ChangeLog (revision 270772) +++ gcc/fortran/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2019-05-01 Andrew Benson <abensonca@gmail.com> + + * module.c (write_module): Initialize module_column before writing + module to ensure line break occurs at correct column. + 2019-04-19 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/90166 Index: gcc/fortran/module.c =================================================================== --- gcc/fortran/module.c (revision 270772) +++ gcc/fortran/module.c (working copy) @@ -6052,6 +6052,9 @@ write_module (void) { int i; + /* Initialize the column counter. */ + module_column = 1; + /* Write the operator interfaces. */ mio_lparen ();