public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Georg.Baum at post dot rwth-aachen.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/67557] Calling copy constructor of base class in constructor of derived class produces crashing code
Date: Sun, 13 Sep 2015 10:34:00 -0000	[thread overview]
Message-ID: <bug-67557-4-0TK93kqrK1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-67557-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67557

--- Comment #6 from Georg Baum <Georg.Baum at post dot rwth-aachen.de> ---
(In reply to Markus Trippelsdorf from comment #4)
> Well, the automatically generated copy constructor is a (special) member
> function.

OK, I see what you mean, but I still do not understand. The automatically
generated default constructor is a special member function as well. Yet calling
it (implicitly by the compiler or explicitly by the programmer in the
initializer list) from a constructor of a derived class is legal. Also,
explicitly calling user defined constructors like in

FontTag::FontTag() : StartTag("") {}

is legal as well (at least this is my understanding and I have seen this many
times in existing code). What is special about a copy constructor that makes
§12.6.2 - 14 apply to it but not to other constructors?
>From gcc-bugs-return-497086-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Sep 13 10:39:08 2015
Return-Path: <gcc-bugs-return-497086-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29843 invoked by alias); 13 Sep 2015 10:39:07 -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 29727 invoked by uid 48); 13 Sep 2015 10:39:03 -0000
From: "dcb314 at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/67563] New: verify_flow_info failed
Date: Sun, 13 Sep 2015 10:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dcb314 at hotmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created
Message-ID: <bug-67563-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg01064.txt.bz2
Content-length: 1449

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67563

            Bug ID: 67563
           Summary: verify_flow_info failed
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 36330
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36330&action=edit
C source code

For trunk gcc dated 20150912

$ ../results/bin/gcc -c -O2 -fexceptions bug228.c
emit_lua.c: In function ‘emit_package.isra.20’:
emit_lua.c:1140:1: error: BB 167 can not throw but has an EH edge
emit_lua.c:1140:1: error: BB 180 can not throw but has an EH edge
emit_lua.c:1140:1: error: BB 192 can not throw but has an EH edge
emit_lua.c:1140:1: error: BB 204 can not throw but has an EH edge
emit_lua.c:1140:1: internal compiler error: verify_flow_info failed
0x722373 verify_flow_info()
        ../../src/trunk/gcc/cfghooks.c:262
0xa7c019 execute_function_todo
        ../../src/trunk/gcc/passes.c:1963
0xa7d557 do_per_function
        ../../src/trunk/gcc/passes.c:1642
0xa7d557 execute_todo
        ../../src/trunk/gcc/passes.c:2008
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-497087-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Sep 13 10:58:02 2015
Return-Path: <gcc-bugs-return-497087-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 54750 invoked by alias); 13 Sep 2015 10:58:01 -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 54140 invoked by uid 48); 13 Sep 2015 10:57:57 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/67563] verify_flow_info failed
Date: Sun, 13 Sep 2015 10:58: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: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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 cf_reconfirmed_on cc everconfirmed cf_known_to_fail
Message-ID: <bug-67563-4-bCub5B5KJO@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67563-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67563-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: 2015-09/txt/msg01065.txt.bz2
Content-length: 751

https://gcc.gnu.org/bugzilla/show_bug.cgi?idg563

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-09-13
                 CC|                            |trippels at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |5.2.1, 6.0

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
static void emit_package (int p1)
{
  int a;
  int b[0];
  a = __fprintf_chk (0, 0, "");
}
void emit_lua () { emit_package (0); }


  parent reply	other threads:[~2015-09-13 10:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-12 11:51 [Bug c++/67557] New: " Georg.Baum at post dot rwth-aachen.de
2015-09-12 12:44 ` [Bug c++/67557] " trippels at gcc dot gnu.org
2015-09-12 14:46 ` trippels at gcc dot gnu.org
2015-09-13  6:59 ` Georg.Baum at post dot rwth-aachen.de
2015-09-13  8:30 ` trippels at gcc dot gnu.org
2015-09-13 10:34 ` Georg.Baum at post dot rwth-aachen.de [this message]
2015-09-14  0:39 ` redi at gcc dot gnu.org
2015-09-14  0:51 ` redi at gcc dot gnu.org
2015-09-14 15:48 ` redi at gcc dot gnu.org
2015-10-07 15:53 ` [Bug c++/67557] [4.9/5/6 regression] " jason at gcc dot gnu.org
2015-10-08 14:42 ` jason at gcc dot gnu.org
2015-10-12  7:59 ` jason at gcc dot gnu.org
2015-10-16  8:22 ` rguenth at gcc dot gnu.org
2015-10-21  9:27 ` jason at gcc dot gnu.org
2024-03-12  6:32 ` [Bug c++/67557] [4.9 Regression] " 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-67557-4-0TK93kqrK1@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).