public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/58270] Wrong code while accessing array elements in a global structure
Date: Mon, 02 Sep 2013 12:21:00 -0000	[thread overview]
Message-ID: <bug-58270-4-11wJ7h2aHk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58270-4@http.gcc.gnu.org/bugzilla/>

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #13 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Example of failing FORTRAN code, with assembler output from gfortran 4.6.4

This code is invalid:

5.7.2.5 Differences between named common and blank common

A blank common block has the same properties as a named common block, except
for the following.

...
\x0f Named common blocks of the same name shall be of the same size in all scoping
units of a program in which they appear, but blank common blocks may be of
di\verent sizes.
...

If you put the two *.f files in the same one and compile the result, you get
the following waring:

Warning: Named COMMON block 'mem' at (1) shall be of the same size as elsewhere
(24 vs 8 bytes)

and the executable gives the result you expect.
>From gcc-bugs-return-428822-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Sep 02 12:27:03 2013
Return-Path: <gcc-bugs-return-428822-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23547 invoked by alias); 2 Sep 2013 12:27:03 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 23517 invoked by uid 48); 2 Sep 2013 12:27:00 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/58283] Incorrect debug info when precompilation is on
Date: Mon, 02 Sep 2013 12:27:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-58283-4-2Mp0mQ3vO9@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58283-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58283-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-09/txt/msg00062.txt.bz2
Content-length: 786

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX283

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
As said, it works for me.  Btw, including a PCH indirectly is not supported:

A precompiled header file can be used only when these conditions apply:

...

@item
A precompiled header can't be used once the first C token is seen.  You
can have preprocessor directives before a precompiled header; you cannot
include a precompiled header from inside another header.


  parent reply	other threads:[~2013-09-02 12:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 10:48 [Bug c/58270] New: Wrong code accessing array elements strasbur at chkw386 dot ch.pwr.wroc.pl
2013-08-29 10:58 ` [Bug c/58270] Wrong code while accessing array elements in a global structure fweimer at redhat dot com
2013-08-29 11:15 ` strasbur at chkw386 dot ch.pwr.wroc.pl
2013-08-29 11:29 ` strasbur at chkw386 dot ch.pwr.wroc.pl
2013-08-29 12:19 ` strasbur at chkw386 dot ch.pwr.wroc.pl
2013-08-29 12:21 ` strasbur at chkw386 dot ch.pwr.wroc.pl
2013-08-29 12:23 ` strasbur at chkw386 dot ch.pwr.wroc.pl
2013-08-29 12:39 ` mikpe at it dot uu.se
2013-08-29 13:32 ` strasbur at chkw386 dot ch.pwr.wroc.pl
2013-08-29 14:48 ` jakub at gcc dot gnu.org
2013-08-29 16:23 ` strasbur at chkw386 dot ch.pwr.wroc.pl
2013-09-02  8:20 ` strasbur at chkw386 dot ch.pwr.wroc.pl
2013-09-02  8:24 ` strasbur at chkw386 dot ch.pwr.wroc.pl
2013-09-02 12:21 ` dominiq at lps dot ens.fr [this message]
2013-09-02 13:14 ` [Bug fortran/58270] " strasbur at chkw386 dot ch.pwr.wroc.pl
2013-09-02 14:39 ` dominiq at lps dot ens.fr
2013-09-02 16:32 ` strasbur at chkw386 dot ch.pwr.wroc.pl
2013-09-02 17:53 ` dominiq at lps dot ens.fr
2013-09-03  7:56 ` strasbur at chkw386 dot ch.pwr.wroc.pl
2013-09-03  9:23 ` [Bug middle-end/58270] Wrong code while accessing trailing array elements in a global common structure rguenth at gcc dot gnu.org
2013-09-03  9:41 ` dominiq at lps dot ens.fr
2013-09-03  9:48 ` dominiq at lps dot ens.fr
2021-11-29  2:32 ` pinskia at gcc dot gnu.org

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-58270-4-11wJ7h2aHk@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).