------- Comment #6 from fxcoudert at gcc dot gnu dot org 2006-05-24 06:14 ------- Reduced testcase (fails at -O1 and higher):
character*1 b b = '' write (*, '()') end is compiled into (-gfump-original-tree): MAIN__ () { char b[1:1]; _gfortran_set_std (70, 127, 0); _gfortran_copy_string (1, &b, 0, ""); { struct __st_parameter_dt dt_parm.0; dt_parm.0.common.filename = "write_logical.f90"; dt_parm.0.common.line = 3; dt_parm.0.common.unit = 6; dt_parm.0.format = "()"; dt_parm.0.format_len = 2; dt_parm.0.common.flags = 4096; _gfortran_st_write (&dt_parm.0); _gfortran_st_write_done (&dt_parm.0); } } but, when setting a breakpoint in _gfortran_st_write, we can see that the format is wrong: (gdb) p dtp->format $4 = 0x2ffc "" and I think it's an alignment issue, because the "real" format is just a bit further down the dtp: (gdb) p dtp->format+1 $5 = 0x2ffd "()" Jerry, which of your patches has been commited on mainline but not on 4.1? -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvdelisle at gcc dot gnu dot | |org, fxcoudert at gcc dot | |gnu dot org, pinskia at gcc | |dot gnu dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2006-05-24 06:14:52 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27683