This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68508] New: Internal compiler error with parentheses around return value in C++14 with ASan enabled
- From: "kainjow at kainjow dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 24 Nov 2015 01:23:26 +0000
- Subject: [Bug c++/68508] New: Internal compiler error with parentheses around return value in C++14 with ASan enabled
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68508
Bug ID: 68508
Summary: Internal compiler error with parentheses around return
value in C++14 with ASan enabled
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kainjow at kainjow dot com
Target Milestone: ---
Using latest i386 ArchLinux with GCC 5.2, I am able to generate an internal
compiler error with this code:
class A {
public:
A() {}
static const A& a() {
static A _a = A();
return (_a);
}
virtual A& operator= (const A&) {
return *this;
}
};
int main() {
return 0;
}
Compile it with:
g++ -std=c++14 -fsanitize=undefined test.cpp
This will generate:
test.cpp: In static member function âstatic const A& A::a()â:
test.cpp:7:19: internal compiler error: in check_return_expr, at
cp/typeck.c:8682
return (_a);