2016-02-08 08:16:33 |
Kip Warner |
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);
^ |
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 |
|