public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/60336] empty struct value is passed differently in C and C++
Date: Thu, 27 Feb 2014 20:53:00 -0000	[thread overview]
Message-ID: <bug-60336-4-YlHPABLtmM@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-60336-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #20 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to H.J. Lu from comment #4)

> Can someone try this on non-x86 targets?

gcc110 (ppc64) from the compile farm:

[uros@gcc1-power7 ~]$ gcc -c fun.i
[uros@gcc1-power7 ~]$ gcc -c x.ii
[uros@gcc1-power7 ~]$ g++ fun.o x.o
[uros@gcc1-power7 ~]$ ./a.out
Aborted

I don't think this is a target bug.
>From gcc-bugs-return-445048-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 27 21:03:54 2014
Return-Path: <gcc-bugs-return-445048-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 6044 invoked by alias); 27 Feb 2014 21:03:53 -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 6023 invoked by uid 48); 27 Feb 2014 21:03:50 -0000
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/60357] [F08] structure constructor with unspecified values for allocatable components
Date: Thu, 27 Feb 2014 21:03:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: janus at gcc dot gnu.org
X-Bugzilla-Status: NEW
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: keywords bug_status cf_reconfirmed_on cc short_desc everconfirmed
Message-ID: <bug-60357-4-vcWH4R3tCT@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60357-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60357-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: 2014-02/txt/msg02805.txt.bz2
Content-length: 1408

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`357

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-02-27
                 CC|                            |janus at gcc dot gnu.org
            Summary|structure constructor with  |[F08] structure constructor
                   |unspecified values for      |with unspecified values for
                   |allocatable components      |allocatable components
     Ever confirmed|0                           |1

--- Comment #1 from janus at gcc dot gnu.org ---
This seems to be allowed only since Fortran 2008. The F03 standard has:

C485 (R457) A component-spec shall be provided for a component unless it has
default initialization or is inheritance associated with another component for
which a component-spec is provided or that has default initialization.

While in F08 this sounds like:

C492 (R455) A component-spec shall be provided for a nonallocatable component
unless it has default initialization or is inheritance associated with a
subcomponent of another component for which a component-spec is provided.

Note in particular the addition of 'nonallocatable'.


  parent reply	other threads:[~2014-02-27 20:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25  9:36 [Bug other/60336] New: va_start corrupts 6-th argument in case of empty type used before the format string ahanins at gmail dot com
2014-02-25 19:53 ` [Bug other/60336] " mikpelinux at gmail dot com
2014-02-25 21:41 ` [Bug c++/60336] " hjl.tools at gmail dot com
2014-02-25 22:35 ` [Bug target/60336] " pinskia at gcc dot gnu.org
2014-02-26 17:03 ` [Bug target/60336] empty struct value is passed differently in C and C++ hjl.tools at gmail dot com
2014-02-26 18:09 ` ubizjak at gmail dot com
2014-02-26 19:06 ` hjl.tools at gmail dot com
2014-02-26 19:25 ` vagran.ast at gmail dot com
2014-02-26 19:31 ` pinskia at gcc dot gnu.org
2014-02-26 19:32 ` hjl.tools at gmail dot com
2014-02-26 19:51 ` glisse at gcc dot gnu.org
2014-02-26 19:55 ` hjl.tools at gmail dot com
2014-02-27 14:37 ` jason at gcc dot gnu.org
2014-02-27 16:04 ` hjl.tools at gmail dot com
2014-02-27 16:17 ` ubizjak at gmail dot com
2014-02-27 17:58 ` jason at gcc dot gnu.org
2014-02-27 18:41 ` jason at gcc dot gnu.org
2014-02-27 20:53 ` ubizjak at gmail dot com [this message]
2014-02-27 21:21 ` pinskia at gcc dot gnu.org
2014-08-12 19:21 ` [Bug c++/60336] " hjl.tools at gmail dot com
2014-08-12 22:58 ` pinskia at gcc dot gnu.org
2014-08-13  5:05 ` vagran.ast at gmail dot com

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-60336-4-YlHPABLtmM@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).