ICE when attempting to construct a struct using placement new
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
Fix Released
|
Medium
|
Unassigned |
Bug Description
- release version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 6.2.1 20161205 (release) [ARM/embedded-
- whether the toolchain was rebuilt or you are using or binary package
Using the binary package off launchpad ( https:/
- host machine
Linux leaf 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/Linux
- preprocessed testcase for us to reproduce
see attachment: `tu_preprocesse
- symptom(s)
internal compiler error when attempting to compile the file
- error/warning message encountered
[green@leaf bug]$ arm-none-eabi-g++ -Os -std=c++14 -c tu_preprocessed.cc
tu.cc: In function 'void fn()':
tu.cc:17:6: internal compiler error: in assign_temp, at function.c:961
void fn (void)
^~
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://
=======
Commentary:
* The issue seems to require specifically using placement new:
replacing the line using placement new with one simply using new will not trigger the ICE.
* The issue requires both a data member AND a destructor to be present. The presence or absence of a constructor does not change whether the problem presents UNLESS the `create` method is available for inlining.
* The issue does not seem to present when using: g++ (GCC) 6.2.1 20160830
Let me know if you need anything else!
Changed in gcc-arm-embedded: | |
status: | New → Confirmed |
Changed in gcc-arm-embedded: | |
status: | Confirmed → In Progress |
Changed in gcc-arm-embedded: | |
milestone: | none → 8-2018-q4-major |
status: | In Progress → Fix Committed |
Changed in gcc-arm-embedded: | |
status: | Fix Committed → Fix Released |
Oh, I forgot one additional thing:
This won't occur with -O0, -O1, -O2, -O3, -O4, -Og but it does occur with -Os.