This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/86135] New: At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: "sabetaytoros at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Jun 2018 14:08:51 +0000
- Subject: [Bug c++/86135] New: At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86135
Bug ID: 86135
Summary: At run time, when the constructor tries to construct
an objects element with a initializer-list (using
c++11 style) is giving segmentation fault. The old
style of initialize with parenthesis is working
properly.
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: sabetaytoros at gmail dot com
Target Milestone: ---
Operating System Windows 8.
Compiler On internet wandbox.org gcc HEAD 9.0 2018O6
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.67.0/gcc-head/include
-std=gnu++2a
Issue :
Initializing an element with angel brackets does not work. Paranthesis is
working.
struct TConcept {
virtual ~TConcept() = default;
virtual void ModelDraw(ostream& os) const = 0;
};
shared_ptr<const TConcept> Self;
template<typename T>
struct TModel final : TConcept {
TModel(T e) : Data { move(e) } { }
// It seems the issue is in this line, initiliazer list C++11 version does
not work
// TModel(T e) : Data ( move(e) ) { }
// C++98 style is working.
void ModelDraw(ostream& os) const {
Draw(os, Data);
}
T Data;
};
- Follow-Ups:
- [Bug c++/86135] At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: mpolacek at gcc dot gnu.org
- [Bug c++/86135] At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: redi at gcc dot gnu.org
- [Bug c++/86135] At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: redi at gcc dot gnu.org
- [Bug c++/86135] At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: sabetaytoros at gmail dot com
- [Bug c++/86135] At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: redi at gcc dot gnu.org
- [Bug c++/86135] At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: sabetaytoros at gmail dot com
- [Bug c++/86135] At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: redi at gcc dot gnu.org
- [Bug c++/86135] At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: redi at gcc dot gnu.org
- [Bug c++/86135] At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: sabetaytoros at gmail dot com
- [Bug c++/86135] At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: redi at gcc dot gnu.org
- [Bug c++/86135] At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: sabetaytoros at gmail dot com
- [Bug c++/86135] At run time, when the constructor tries to construct an objects element with a initializer-list (using c++11 style) is giving segmentation fault. The old style of initialize with parenthesis is working properly.
- From: sabetaytoros at gmail dot com