This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR optimization/4490 (-m128bit-long-double on ia32)


Hi!

optimization/4490:

/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-options "-m128bit-long-double -O2" { target i?86-*-* } } */

double f (unsigned long long x)
{
  double d = x;
  return d;
}

ICEs because optabs for the d = x assignment (which cannot be done in
DFmode) looks up a wider mode. Wider mode is XFmode and IA-32, if
!TARGET_64BIT, has XFmode patterns, so optabs attempts to use them
(which is what -m128bit-long-double should prevent IMHO).
But as long double is TFmode in this case, type_for_mode cannot find any
type for mode XFmode and soon after it segfaults in IA-32 CONSTANT_ALIGNMENT
implementation.

Shouldn't all IA-32 XFmode patterns be banned if TARGET_128BIT_LONG_DOUBLE
(ie. replace all !TARGET_64BIT in XFmode patterns with
!TARGET_128BIT_LONG_DOUBLE)?

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]