gcc

g++ crash dump on building SoftFloatWrapper.cpp

Bug #1543019 reported by Kip Warner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Spring
In Progress
Unknown
gcc
Unknown
Unknown

Bug Description

Looks as though I have discovered a bug in all supported versions of GCC.

$ cat cra.ii
namespace streflop {
template <int> struct A { operator long double() const; };
namespace SoftFloat {
typedef struct {
  long long low;
  int high;
} floatx80;
floatx80 fn1(int);
}
using namespace SoftFloat;
template <> A<32>::operator long double() const {
  long double a;
  *reinterpret_cast<floatx80 *>(&a) = fn1(0);
  return a;
}
}

$ g++ -c -m32 -O3 cra.ii
cra.ii: In member function ‘streflop::A<<anonymous> >::operator long double() const [with int <anonymous> = 32]’:
cra.ii:13:51: internal compiler error: in store_bit_field_1, at expmed.c:765
         *reinterpret_cast<floatx80 *>(&a) = fn1(0);
                                                   ^

Upstream bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69715

Kip Warner (kip)
affects: raspbian → gcc
description: updated
Revision history for this message
peter green (plugwash) wrote :

What versions have you found this to happen with?

Are there any versions of gcc you have found this does not happen with (the upstream bug report implies it but isn't too explicit)

Revision history for this message
peter green (plugwash) wrote :

Also you filed this as a raspbian bug but then changed it away. Can you clarify whether you intend this as a Raspbian bug report?

Kip Warner (kip)
Changed in gcc:
importance: Undecided → Unknown
status: New → Unknown
Revision history for this message
Kip Warner (kip) wrote :

Hey peter. I can replicate with 5.2.1 on amd64, but it appears to happen on all versions of GCC according to upstream. I first noticed it when g++ crashed while building a package in my PPA.

https://launchpad.net/~kip/+archive/ubuntu/streflop/+build/8981373/+files/buildlog_ubuntu-wily-i386.streflop_0.3-kip5_BUILDING.txt.gz

This only happened for i386 build and not amd64.

This bug does not affect raspbian as far as I am aware. I had accidentally selected raspbian.

Changed in spring:
status: Unknown → Incomplete
Revision history for this message
Kip Warner (kip) wrote :

Launchpad doesn't seem to be able to scrape upstream's tracker for gcc-bugzilla #69715. In any case, the bug has been replicated and a fix committed.

Kip Warner (kip)
Changed in gcc:
importance: Unknown → Undecided
status: Unknown → New
importance: Undecided → Unknown
status: New → Unknown
Changed in spring:
status: Incomplete → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.