public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/56293] New: I/O: Segfault in write_float when trying to print a not-word-aligned REAL(16) /  -fno-align-commons
@ 2013-02-12  9:51 burnus at gcc dot gnu.org
  2013-02-12  9:52 ` [Bug fortran/56293] " burnus at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-02-12  9:51 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56293

             Bug #: 56293
           Summary: I/O: Segfault in write_float when trying to print a
                    not-word-aligned REAL(16) /  -fno-align-commons
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: jb@gcc.gnu.org, jvdelisle@gcc.gnu.org


Reported by Maciej Skrzypek at
http://gcc.gnu.org/ml/fortran/2013-02/msg00058.html

In the following code, "p" is not aligned; using it fails in GCC 4.8 with a
segfault in

#0  0x00007ffff7ba5e16 in write_float (dtp=dtp@entry=0x7fffffffde40,
f=f@entry=0x7fffffffdd70, source=source@entry=0x601084 <sss_+4> "",
len=len@entry=16, 
    comp_d=comp_d@entry=1) at libgfortran/io/write_float.def:1259
#1  0x00007ffff7ba8365 in _gfortrani_write_real (dtp=dtp@entry=0x7fffffffde40,
source=source@entry=0x601084 <sss_+4> "", length=length@entry=16)
    at libgfortran/io/write.c:1470
#2  0x00007ffff7ba8dcf in list_formatted_write_scalar (size=16, kind=16,
p=0x601084 <sss_+4>, type=BT_REAL, dtp=0x7fffffffde40) at
libgfortran/io/write.c:1571
#3  _gfortrani_list_formatted_write (dtp=0x7fffffffde40, type=BT_REAL,
p=<optimized out>, kind=16, size=16, nelems=1) at libgfortran/io/write.c:1599



Compile with:  -fno-align-commons

      program main
      real(16) p
      integer i
      common/sss/ i, p
      print*, p
      end


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-01-07 14:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-12  9:51 [Bug fortran/56293] New: I/O: Segfault in write_float when trying to print a not-word-aligned REAL(16) / -fno-align-commons burnus at gcc dot gnu.org
2013-02-12  9:52 ` [Bug fortran/56293] " burnus at gcc dot gnu.org
2013-02-12 10:23 ` tobi at gcc dot gnu.org
2013-02-12 12:35 ` [Bug fortran/56293] Segfault when trying to access pass-by-reference value of " burnus at gcc dot gnu.org
2013-02-12 12:40 ` rguenth at gcc dot gnu.org
2013-02-12 13:07 ` burnus at gcc dot gnu.org
2013-03-10 15:32 ` tkoenig at gcc dot gnu.org
2013-03-11  0:16 ` tobi at gcc dot gnu.org
2014-01-07 14:04 ` dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).