public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65954] New: gcc segfaults on the following input with a syntax error
@ 2015-04-30 18:22 federl at gmail dot com
2015-05-20 1:54 ` [Bug c++/65954] " nathan at gcc dot gnu.org
2015-05-21 19:17 ` nathan at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: federl at gmail dot com @ 2015-04-30 18:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65954
Bug ID: 65954
Summary: gcc segfaults on the following input with a syntax
error
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: federl at gmail dot com
Target Milestone: ---
g++ 4.8.2 on Ubuntu 14.04.2 LTS, 64bit throws a segmentation fault on the input
below (it contains a small typo Cicle instead of Circle). BTW, fixing the typo
also fixes the segfault...
$ cat test.cpp
namespace carta {
namespace lib {
class Shape {
public:
enum class Type { Circle, Square };
};
}
}
int main( int, char **)
{
auto x = carta::lib::Shape::Type::Circle;
carta::lib::Shape shape;
carta::lib::Shape::Type y;
y = shape.Type::Cicle;
return 0;
}
$ g++ -std=c++11 test.cpp
test.cpp: In function ‘int main(int, char**)’:
test.cpp:15:21: internal compiler error: Segmentation fault
y = shape.Type::Cicle;
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
Preprocessed source stored into /tmp/cc94vBRp.out file, please attach this to
your bugreport.
$ cat /tmp/cc94vBRp.out
// /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1plus -quiet -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE test.cpp -quiet -dumpbase test.cpp
-mtune=generic -march=x86-64 -auxbase test -std=c++11 -fstack-protector
-Wformat -Wformat-security -o - -frandom-seed=0
# 1 "test.cpp"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "test.cpp"
namespace carta {
namespace lib {
class Shape {
public:
enum class Type { Circle, Square };
};
}
}
int main( int, char **)
{
auto x = carta::lib::Shape::Type::Circle;
carta::lib::Shape shape;
carta::lib::Shape::Type y;
y = shape.Type::Cicle;
return 0;
}
>From gcc-bugs-return-485136-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Apr 30 18:42:11 2015
Return-Path: <gcc-bugs-return-485136-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 722 invoked by alias); 30 Apr 2015 18:42:11 -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 627 invoked by uid 55); 30 Apr 2015 18:42:06 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/64153] [5.0 regression] r218205 miscompiles libgomp
Date: Thu, 30 Apr 2015 18:42:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ipa
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: jamborm at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-64153-4-GeZAHQSq6V@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64153-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64153-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-04/txt/msg02688.txt.bz2
Content-length: 1389
https://gcc.gnu.org/bugzilla/show_bug.cgi?idd153
--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Thu Apr 30 18:41:33 2015
New Revision: 222653
URL: https://gcc.gnu.org/viewcvs?rev"2653&root=gcc&view=rev
Log:
* g++.dg/ipa/pr63551.C: New test.
Backported from mainline
2014-12-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/63551
* gcc.dg/ipa/pr63551.c (fn2): Use 4294967286U instead of
4294967286 to avoid warnings.
2014-12-03 Martin Jambor <mjambor@suse.cz>
PR ipa/64153
* ipa-inline-analysis.c (evaluate_conditions_for_known_args): Check
type sizes before view_converting.
2014-12-01 Martin Jambor <mjambor@suse.cz>
PR ipa/63551
* ipa-inline-analysis.c (evaluate_conditions_for_known_args): Convert
value of the argument to the type of the value in the condition.
* gcc.dg/ipa/pr63551.c: New test.
* gcc.dg/ipa/pr64041.c: Likewise.
Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/ipa/pr63551.C
branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/ipa/pr63551.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/ipa/pr64041.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/ipa-inline-analysis.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/65954] gcc segfaults on the following input with a syntax error
2015-04-30 18:22 [Bug c++/65954] New: gcc segfaults on the following input with a syntax error federl at gmail dot com
@ 2015-05-20 1:54 ` nathan at gcc dot gnu.org
2015-05-21 19:17 ` nathan at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: nathan at gcc dot gnu.org @ 2015-05-20 1:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65954
--- Comment #1 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Author: nathan
Date: Wed May 20 01:54:09 2015
New Revision: 223430
URL: https://gcc.gnu.org/viewcvs?rev=223430&root=gcc&view=rev
Log:
cp/
PR c++/65954
* typeck.c (finish_class_member_access_expr): Diagnose failed
lookup of enum class member.
testsuite/
* g++.dg/cpp0x/pr65954.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/pr65954.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/65954] gcc segfaults on the following input with a syntax error
2015-04-30 18:22 [Bug c++/65954] New: gcc segfaults on the following input with a syntax error federl at gmail dot com
2015-05-20 1:54 ` [Bug c++/65954] " nathan at gcc dot gnu.org
@ 2015-05-21 19:17 ` nathan at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: nathan at gcc dot gnu.org @ 2015-05-21 19:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65954
Nathan Sidwell <nathan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Added expected diagnostic
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-21 19:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-30 18:22 [Bug c++/65954] New: gcc segfaults on the following input with a syntax error federl at gmail dot com
2015-05-20 1:54 ` [Bug c++/65954] " nathan at gcc dot gnu.org
2015-05-21 19:17 ` nathan at gcc dot gnu.org
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).