public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tobi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/56293] Segfault when trying to access pass-by-reference value of a not-word-aligned REAL(16) /  -fno-align-commons
Date: Mon, 11 Mar 2013 00:16:00 -0000	[thread overview]
Message-ID: <bug-56293-4-iHOjsouHsG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56293-4@http.gcc.gnu.org/bugzilla/>


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

--- Comment #7 from Tobias Schlüter <tobi at gcc dot gnu.org> 2013-03-11 00:15:43 UTC ---
(In reply to comment #6)
> > The question is also whether one can construct a fully standard-conform example
> > which fails without -fno-align-commons – and whether some real-world code uses
> > COMMON in a way that would fails with alignments/padding.
> 
>       program main
>       real a,f1,f2,d
>       common /foo/ a,f1,f2,d
>       a = 1.0
>       d = 1.0
>       call s1
>       end
>       subroutine s1
>       real a,b
>       double precision d
>       common /foo/ a,d,b
>       print *,a
>       print *,b
>       end

That's not valid.  I'm looking at the F95 working draft:
according to note 5.33
"""Association in different scoping units between objects of default type,
objects of double precision real type, and sequence structures is permitted
according to the rules for equivalence objects (5.5.1)."""

and in 5.5.1. we have
"""If an equivalence-object is of type default integer, default real, double
precision real, default complex, default logical, or numeric sequence type, all
of the objects in the equivalence set shall be of these types."""


  parent reply	other threads:[~2013-03-11  0:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12  9:51 [Bug fortran/56293] New: I/O: Segfault in write_float when trying to print " 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 [this message]
2014-01-07 14:04 ` dominiq at lps dot ens.fr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56293-4-iHOjsouHsG@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).