public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gcc at swtaarrs dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/64527] New: Constructor for empty struct not called in some situations
Date: Wed, 07 Jan 2015 19:21:00 -0000	[thread overview]
Message-ID: <bug-64527-4@http.gcc.gnu.org/bugzilla/> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 5062 bytes --]

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

            Bug ID: 64527
           Summary: Constructor for empty struct not called in some
                    situations
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc at swtaarrs dot com

Created attachment 34396
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34396&action=edit
c++ code exposing the bug

Build ctor.cpp with the following command:

> g++ -std=c++11 -Os -S -o ctor.S ctor.cpp

The optimization level doesn't appear to affect the presence of the bug, I just
used -Os to keep the output more compact.

Expected results: The m() function in ctor.S should contain a call to A::A().

Actual results: m() does nothing but zero out accessor::x. I've found at least
three ways to perturb the bug out of existence which are documented in comments
in the file.

The bug is also present in gcc 4.8.1 (I haven't tried anything older).

Compiling with -Wextra reports "warning: missing initializer for member
‘accessor::a’ [-Wmissing-field-initializers]" but I believe this shouldn't
affect the ouput.


gcc build info:

Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/home/matthew/gcc-4.9.0-prefix
Thread model: posix
gcc version 4.9.0 (GCC)
>From gcc-bugs-return-472409-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 07 19:39:40 2015
Return-Path: <gcc-bugs-return-472409-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23856 invoked by alias); 7 Jan 2015 19:39:39 -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 23798 invoked by uid 48); 7 Jan 2015 19:39:33 -0000
From: "zsojka at seznam dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/64528] New: [5 Regression] ICE: in process_constraint, at tree-ssa-structalias.c:3002 with -O -fno-tree-ccp -fno-tree-dce
Date: Wed, 07 Jan 2015 19:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: zsojka at seznam dot cz
X-Bugzilla-Status: UNCONFIRMED
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 attachments.created
Message-ID: <bug-64528-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-01/txt/msg00403.txt.bz2
Content-length: 1711

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

            Bug ID: 64528
           Summary: [5 Regression] ICE: in process_constraint, at
                    tree-ssa-structalias.c:3002 with -O -fno-tree-ccp
                    -fno-tree-dce
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz

Created attachment 34397
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id4397&actioníit
reduced testcase (from gfortran.dg/value_test.f90)

Compiler output:
$ gcc -O -fno-tree-ccp -fno-tree-dce testcase.f90
testcase.f90:11:0:

 end program valueTests
 ^
internal compiler error: in process_constraint, at tree-ssa-structalias.c:3002
0xe7907d process_constraint
        /mnt/svn/gcc-trunk/gcc/tree-ssa-structalias.c:3002
0xe793b3 process_all_all_constraints
        /mnt/svn/gcc-trunk/gcc/tree-ssa-structalias.c:3581
0xe84cd3 find_func_aliases
        /mnt/svn/gcc-trunk/gcc/tree-ssa-structalias.c:4748
0xe87c26 compute_points_to_sets
        /mnt/svn/gcc-trunk/gcc/tree-ssa-structalias.c:6825
0xe87c26 compute_may_aliases()
        /mnt/svn/gcc-trunk/gcc/tree-ssa-structalias.c:7161
0xbbd8ec execute_function_todo
        /mnt/svn/gcc-trunk/gcc/passes.c:1912
0xbbe563 execute_todo
        /mnt/svn/gcc-trunk/gcc/passes.c:1997
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.

Tested revisions:
r219277 - ICE
r218446 - ICE
r212099 - ICE
4_9 r219040 - OK


             reply	other threads:[~2015-01-07 19:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07 19:21 gcc at swtaarrs dot com [this message]
2015-01-07 21:20 ` [Bug c++/64527] " gcc at swtaarrs dot com
2015-04-15 13:15 ` ppalka at gcc dot gnu.org
2015-04-17 12:15 ` ppalka at gcc dot gnu.org
2015-04-17 12:50 ` ppalka 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-64527-4@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).