[Bug target/50944] New: gcc-4.6.x regression with complex.h on i386-pc-solaris2.10

2011-11-01 Thread mariah.lenox at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50944

 Bug #: 50944
   Summary: gcc-4.6.x regression with complex.h on
i386-pc-solaris2.10
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mariah.le...@gmail.com


This is reopening #48949 which got closed.

% gcc -c foo.c
foo.c: In function 'foo':
foo.c:5:11: error: '_Imaginary_I' undeclared (first use in this function)
foo.c:5:11: note: each undeclared identifier is reported only once for each
function it appears in
% 
% gcc-4.5.1 -c foo.c
%
% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.6.1/sparc-SunOS-ultrasparc3/libexec/gcc/sparc-sun-solaris2.10/4.6.1/lto-wrapper
Target: sparc-sun-solaris2.10
Configured with: /usr/local/gcc-4.6.1/src/gcc-4.6.1/configure
--enable-languages=c,c++,fortran --with-gnu-as
--with-as=/usr/local/binutils-2.20.1/sparc-SunOS-ultrasparc3-gcc-4.4.3/bin/as
--with-gnu-ld
--with-ld=/usr/local/binutils-2.20.1/sparc-SunOS-ultrasparc3-gcc-4.4.3/bin/ld
--with-gmp=/usr/local/mpir-2.4.0/sparc-SunOS-ultrasparc3-gcc-4.6.0-abi32
--with-mpfr=/usr/local/mpfr-3.0.1/sparc-SunOS-ultrasparc3-mpir-2.4.0-gcc-4.6.0-abi32
--with-mpc=/usr/local/mpc-0.9/sparc-SunOS-ultrasparc3-mpir-2.4.0-mpfr-3.0.1-gcc-4.5.1-abi32
--prefix=/usr/local/gcc-4.6.1/sparc-SunOS-ultrasparc3
Thread model: posix
gcc version 4.6.1 (GCC) 
%
% cat foo.c
#include 

double _Complex
foo () {
   return I;
}
%
% gcc -E foo.c | grep complex.h
# 1 "/usr/include/complex.h" 1 3 4
# 9 "/usr/include/complex.h" 3 4
#pragma ident "@(#)complex.h1.9 04/10/23 SMI"
# 24 "/usr/include/complex.h" 3 4
# 61 "/usr/include/complex.h" 3 4
# 61 "/usr/include/complex.h" 3 4
% 
% diff /usr/include/complex.h
/usr/local/gcc-4.6.1/sparc-SunOS-ultrasparc3/inclu
de/c++/4.6.1/complex.h
1,4c1
< /*
<  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
<  * Use is subject to license terms.
<  */
---
> // -*- C++ -*- compatibility header.
6,7c3,9
< #ifndef _COMPLEX_H
< #define   _COMPLEX_H
---
> // Copyright (C) 2007, 2009 Free Software Foundation, Inc.
> //
> // This file is part of the GNU ISO C++ Library.  This library is free
> // software; you can redistribute it and/or modify it under the
> // terms of the GNU General Public License as published by the
> // Free Software Foundation; either version 3, or (at your option)
> // any later version.
9c11,14
< #pragma ident "@(#)complex.h  1.9 04/10/23 SMI"
---
> // This library is distributed in the hope that it will be useful,
> // but WITHOUT ANY WARRANTY; without even the implied warranty of
> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> // GNU General Public License for more details.
11c16,18
< #if !defined(__cplusplus)
---
> // Under Section 7 of GPL version 3, you are granted additional
> // permissions described in the GCC Runtime Library Exception, version
> // 3.1, as published by the Free Software Foundation.
13,15c20,26
< /*
<  * Compilation environments for Solaris must provide the _Imaginary datatype
<  * and the compiler intrinsics _Complex_I and _Imaginary_I
---
> // You should have received a copy of the GNU General Public License and
> // a copy of the GCC Runtime Library Exception along with this program;
> // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
> // .
> 
> /** @file complex.h
>  *  This is a Standard C++ Library header.
17,22d27
< #define   _Complex_I  _Complex_I
< #define   complex _Complex
< #define   _Imaginary_I_Imaginary_I
< #define   imaginary   _Imaginary
< #undefI
< #define   I   _Imaginary_I
24,45c29
< extern float cabsf(float complex);
< extern float cargf(float complex);
< extern float cimagf(float complex);
< extern float crealf(float complex);
< extern float complex cacosf(float complex);
< extern float complex cacoshf(float complex);
< extern float complex casinf(float complex);
< extern float complex casinhf(float complex);
< extern float complex catanf(float complex);
< extern float complex catanhf(float complex);
< extern float complex ccosf(float complex);
< extern float complex ccoshf(float complex);
< extern float complex cexpf(float complex);
< extern float complex clogf(float complex);
< extern float complex conjf(float complex);
< extern float complex cpowf(float complex, float complex);
< extern float complex cprojf(float complex);
< extern float complex csinf(float complex);
< extern float complex csinhf(float complex);
< extern float complex csqrtf(float complex);
< extern float complex ctanf(float complex);
< extern float complex ctanhf(float complex);
---
> #include 
47,61c31,32
< extern double cabs(double complex);
< extern double carg(double complex);
< extern double cimag(doubl

[Bug target/48949] [4.6/4.7 Regression] gcc-4.6.0 regression with complex.h on i386-pc-solaris2.10

2011-11-02 Thread mariah.lenox at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48949

--- Comment #8 from Mariah Lenox  2011-11-02 
13:18:52 UTC ---
> Please answer comment #3.

Answers provided on bug report 50944.


[Bug target/48949] [4.6/4.7 Regression] gcc-4.6.0 regression with complex.h on i386-pc-solaris2.10

2012-01-19 Thread mariah.lenox at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48949

Mariah Lenox  changed:

   What|Removed |Added

  Known to fail||4.6.2

--- Comment #11 from Mariah Lenox  2012-01-19 
20:48:33 UTC ---
I get this bug on 

sparc-sun-solaris2.8
sparc-sun-solaris2.10
i386-pc-solaris2.10

> Can you look into your logs if you have message like:
> Applying solaris_complex  to complex.h
> in your build log?

Yes, this message appears in my build log:

: Quoted includes in mps/secport.h
: Applying solaris_complex  to complex.h
: Applying solaris_complex_cxx  to complex.h
: /opt/sfw/bin/gsed: -e expression #1, char 33: Extra characters after command
: Applying math_exception   to math.h

> Can you look into your build tree if you have
> gcc/include-fixed/complex.h header?

It does NOT exist:

% pwd
/usr/local/gcc-4.6.2/src/obj-x86_64-SunOS-k8/gcc/include-fixed
% ls
READMEcurses.h  math.hsys/  zconf.h
X11@  dat/  mps/  syslimits.h
Xm@   iso/  pthread.h wchar.h
arpa/ limits.h  root/ xil@
%

>Did it get installed?
> /usr/local/gcc-4.6.0/x86_64-SunOS-core2/lib/gcc/i386-pc-solaris2.10/4.6.0/include-fixed/complex.h
> would be the installed location of the file. 

It did NOT get installed:

% pwd
/usr/local/gcc-4.6.2/x86_64-SunOS-k8/lib/gcc/i386-pc-solaris2.10/4.6.2/include-fixed
% ls
READMEcurses.h  math.hsys/  zconf.h
X11@  dat/  mps/  syslimits.h
Xm@   iso/  pthread.h wchar.h
arpa/ limits.h  root/ xil@
% 
%
% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.6.2/x86_64-SunOS-k8/libexec/gcc/i386-pc-solaris2.10/4.6.2/lto-wrapper
Target: i386-pc-solaris2.10
Configured with: /usr/local/gcc-4.6.2/src/gcc-4.6.2/configure
--enable-languages=c --with-gnu-as
--with-as=/usr/local/binutils-2.21.1/x86_64-SunOS-k8-gcc-4.6.1-without-zlib/bin/as
--with-gnu-ld
--with-ld=/usr/local/binutils-2.21.1/x86_64-SunOS-k8-gcc-4.6.1-without-zlib/bin/ld
--with-gmp=/usr/local/gmp-5.0.2/x86_64-SunOS-k8-gcc-4.6.0-abi32
--with-mpfr=/usr/local/mpfr-3.1.0/x86_64-SunOS-k8-gmp-5.0.2-gcc-4.6.1-abi32
--with-mpc=/usr/local/mpc-0.9/x86_64-SunOS-k8-gmp-5.0.2-mpfr-3.1.0-gcc-4.5.3-abi32
--prefix=/usr/local/gcc-4.6.2/x86_64-SunOS-k8
Thread model: posix
gcc version 4.6.2 (GCC) 
%


[Bug target/48949] [4.6/4.7 Regression] gcc-4.6.0 regression with complex.h on i386-pc-solaris2.10

2012-01-19 Thread mariah.lenox at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48949

--- Comment #12 from Mariah Lenox  2012-01-19 
21:07:21 UTC ---
Further information from i386-pc-solaris2.10 machine

% /opt/sfw/bin/gsed --version
GNU sed version 3.02

On my sparc-sun-solaris2.10 machine, I have

: Fixed:  wchar.h
: Applying solaris_complex  to complex.h
: Applying solaris_complex_cxx  to complex.h
: sed: command garbled: /#if[ ]*!defined(__cplusplus)/c#ifdef __cplusplus\
: extern "C" {\
: #endif
: Applying math_exception   to math.h


[Bug rtl-optimization/48702] New: optimization regression with gcc-4.6 on x86_64-unknown-linux-gnu

2011-04-20 Thread mariah.lenox at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48702

   Summary: optimization regression with gcc-4.6 on
x86_64-unknown-linux-gnu
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mariah.le...@gmail.com


/* optimization regression with gcc-4.6.0 on x86_64-unknown-linux-gnu

% gcc-4.6.0 -O2 -o foo foo.c
% foo
% 1
%
% gcc-4.6.0 -O1 -o foo foo.c
% foo
% 4
%
% gcc-4.5.1 -O2 -o foo foo.c
% foo
% 4

% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.6.0/x86_64-Linux-core2-fc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /usr/local/gcc-4.6.0/src/gcc-4.6.0/configure
--enable-languages=c,c++,fortran --with-gnu-as
--with-gnu-as=/usr/local/binutils-2.21/x86_64-Linux-core2-fc-gcc-4.5.1-rh/bin/as
--with-gnu-ld
--with-ld=/usr/local/binutils-2.21/x86_64-Linux-core2-fc-gcc-4.5.1-rh/bin/ld
--with-gmp=/usr/local/mpir-2.3.0/x86_64-Linux-core2-fc-gcc-4.5.1-rh
--with-mpfr=/usr/local/mpfr-3.0.0/x86_64-Linux-core2-fc-mpir-2.3.0-gcc-4.5.1-rh
--with-mpc=/usr/local/mpc-0.9/x86_64-Linux-core2-fc-mpir-2.3.0-mpfr-3.0.0-gcc-4.5.1-rh
--prefix=/usr/local/gcc-4.6.0/x86_64-Linux-core2-fc
Thread model: posix
gcc version 4.6.0 (GCC) 
%

*/

#include  

#define LEN 4  

void unpack(int  array[LEN])
{
int ii, val;

val = 1;
for (ii = 0; ii < LEN; ii++) {
  array[ii] = val % 2;
  val = val / 2;
}

return;
}

int  pack(int  array[LEN])
{
int ans, ii;

ans = 0;
for (ii = LEN-1; ii >= 0; ii--) {
  ans = 2 * ans + array[ii];
}

return ans;
}

int  foo()
{
int temp, ans;
int array[LEN];

unpack(array);
temp = array[0];
array[0] = array[2];
array[2] = temp;
ans = pack(array);
return ans;
}

int main(void)
{
int val;

val = foo();
printf("%d\n", val);

return 0; 
}


[Bug rtl-optimization/48774] New: gcc-4.6.0 optimization regression on x86_64-unknown-linux-gnu

2011-04-26 Thread mariah.lenox at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48774

   Summary: gcc-4.6.0 optimization regression on
x86_64-unknown-linux-gnu
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mariah.le...@gmail.com


/* gcc-4.6.0 optimization regression on x86_64-unknown-linux-gnu:

% gcc  -O1  -funroll-loops -o foo foo.c
foo
order= 11
%
% gcc  -O2  -funroll-loops -o foo foo.c
foo  # hangs
make: *** [bad] Interrupt
%
% gcc-4.5.1 -O2  -funroll-loops -o foo foo.c
foo
order=11
%
% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.6.0/x86_64-Linux-core2-fc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /usr/local/gcc-4.6.0/src/gcc-4.6.0/configure
--enable-languages=c,c++,fortran --with-gnu-as
--with-gnu-as=/usr/local/binutils-2.21/x86_64-Linux-core2-fc-gcc-4.5.1-rh/bin/as
--with-gnu-ld
--with-ld=/usr/local/binutils-2.21/x86_64-Linux-core2-fc-gcc-4.5.1-rh/bin/ld
--with-gmp=/usr/local/mpir-2.3.0/x86_64-Linux-core2-fc-gcc-4.5.1-rh
--with-mpfr=/usr/local/mpfr-3.0.0/x86_64-Linux-core2-fc-mpir-2.3.0-gcc-4.5.1-rh
--with-mpc=/usr/local/mpc-0.9/x86_64-Linux-core2-fc-mpir-2.3.0-mpfr-3.0.0-gcc-4.5.1-rh
--prefix=/usr/local/gcc-4.6.0/x86_64-Linux-core2-fc
Thread model: posix
gcc version 4.6.0 (GCC) 
%

Apologies that this code is so long, but I can not find any way
to shorten it further and still demonstrate the bug.
*/
#include 
#include 
#include 

#define SIZE 12

unsigned long int ss[SIZE][2];

#define SET_BIT_MASK(x) ((unsigned long)1<<(x))

#define SET_ELEMENT_CONTAINS(e,v)   ((e)&SET_BIT_MASK(v))

#define SET_CONTAINS_FAST(s,a) (SET_ELEMENT_CONTAINS((s)[0], (a)))

#define SET_CONTAINS(s,a) (((a)edges[(0)]))[-1])?SET_CONTAINS_FAST((g)->edges[(i)],j):0)
/*
  SET_CONTAINS((g)->edges[(i)], (j))
*/

int bar(graph_t *g) {
  int i,j,v;
  int tmp_used[SIZE];
  int degree[SIZE];
  int order[SIZE];
  int maxdegree,maxvertex=0;
  int samecolor;

  for (i = 0; i < SIZE; i++) {
order[i] = 0;
degree[i] = 0;
  }

  for (i=0; i < g->n; i++) {
for (j=0; j < g->n; j++) {
  if ((i==j) && GRAPH_IS_EDGE(g,i,j)) {
exit(0);;
  } 
  if (GRAPH_IS_EDGE(g,i,j)) degree[i]++;
}
  }

  v=0;
  while (v < SIZE) {
memset(tmp_used,0,SIZE * sizeof(int));

do {
  maxdegree=0;
  samecolor=0;
  for (i=0; i < SIZE; i++) {
if (!tmp_used[i] && degree[i] >= maxdegree) {
  maxvertex=i;
  maxdegree=degree[i];
  samecolor=1;
}
  }
  if (samecolor) {
order[v]=maxvertex;
degree[maxvertex]=-1;
v++;
for (i=0; i < SIZE; i++) {
  if (GRAPH_IS_EDGE(g,maxvertex,i)) {
tmp_used[i]=1;
degree[i]--;
  }
}
  }
} while (samecolor);
  }

  return order[0];
}


graph_t *make_graph() {
  graph_t *g;
  int i;

  for (i=0; i < SIZE; i++) {
ss[i][0] = SIZE;
  }
  ss[0][1] = 2114;
  ss[1][1] = 37;
  ss[2][1] = 1034;
  ss[3][1] = 532;
  ss[4][1] = 296;
  ss[5][1] = 82;
  ss[6][1] = 161;
  ss[7][1] = 2368;
  ss[8][1] = 656;
  ss[9][1] = 1288;
  ss[10][1] = 2564;
  ss[11][1] = 1153;

  g = ≫
  g->n=SIZE;
  for (i=0; i < SIZE; i++) {
g->edges[i]=&(ss[i][1]);
  }

  return g;
}



int main(int argc, char **argv) {

  graph_t *g;
  int order;

  g = make_graph();
  order = bar(g);
  printf("order= %d\n", order);

  return 0;
}


[Bug rtl-optimization/48823] New: gcc-4.6.0 floating-point optimization regression on ia64-Linux

2011-04-29 Thread mariah.lenox at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48823

   Summary: gcc-4.6.0 floating-point optimization regression on
ia64-Linux
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mariah.le...@gmail.com


/* gcc-4.6.0 floating-point optimization regression on ia64-Linux

% gcc -O1 -o foo foo.c
% foo
g3  = 35f2349dc34f3df6
i[1]= 3ca1a62633145c07
i[2]= b92f1976b7ed8fbc
j[1]= 3ca4d57ee2b1013a
j[2]= b92618713a31d3e2
val = 35bfd0f99254c580
8.53973422267356774285
402114580b45d475
% 
%
% gcc -O2 -o foo foo.c
% foo
g3  = 35f2349dc34f3df6
i[1]= 3ca1a62633145c07
i[2]= b92f1976b7ed8fbc
j[1]= 3ca4d57ee2b1013a
j[2]= b92618713a31d3e2
val = 35bfd0f99254c590
8.53973422267356596649
402114580b45d474
**ERROR** QD_check failed at x[0]
%
%
% gcc-4.5.1 -O2 -o foo foo.c
% foo
g3  = 35f2349dc34f3df6
i[1]= 3ca1a62633145c07
i[2]= b92f1976b7ed8fbc
j[1]= 3ca4d57ee2b1013a
j[2]= b92618713a31d3e2
val = 35bfd0f99254c590
8.53973422267356774285
402114580b45d475
%

# note that this code compiles and runs successfully 
# with gcc-4.5.1 -03


% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.6.0/ia64-Linux-gmp-5.0.1/libexec/gcc/ia64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: ia64-unknown-linux-gnu
Configured with: /usr/local/gcc-4.6.0/src/gcc-4.6.0/configure
--enable-languages=c,c++,fortran --with-gnu-as
--with-as=/usr/local/binutils-2.21/ia64-Linux-rhel-gcc-4.5.1/bin/as
--with-gnu-ld
--with-ld=/usr/local/binutils-2.21/ia64-Linux-rhel-gcc-4.5.1/bin/ld
--with-gmp=/usr/local/gmp-5.0.1/ia64-Linux-rhel-gcc-4.5.0
--with-mpfr=/usr/local/mpfr-3.0.1/ia64-Linux-rhel-gmp-5.0.1-gcc-4.6.0
--with-mpc=/usr/local/mpc-0.9/ia64-Linux-rhel-gmp-5.0.1-mpfr-3.0.1-gcc-4.6.0
--prefix=/usr/local/gcc-4.6.0/ia64-Linux-gmp-5.0.1
Thread model: posix
gcc version 4.6.0 (GCC) 
%

*/

#include 
#include 
#include 
#include 

double QD_e[4]={2.718281828459045091e+00,1.445646891729250158e-16,
-2.127717108038176765e-33,1.515630159841218954e-49};
double QD_pi[4]=
{3.141592653589793116e+00,1.224646799147353207e-16,
 -2.994769809718339666e-33,1.112454220863365282e-49};

#define QD_qsum(a,b,s,e) {double z1; s=a+b; z1=s-a; e=b-z1;}
#define QD_sum(a,b,s,e)\
 {double bb,z1,z2; s=a+b; bb=s-a; z1=s-bb; z2=a-z1; z1=b-bb; e=z1+z2;}
#define QD_split(a,hi,lo)\
{double xt=134217729.0*a,z1; z1=xt-a; hi=xt-z1; lo=a-hi;}
#define QD_prod(a,b,p,e)\
{double ah,al,bh,bl,z1,z2,z3,z4; p=a*b; QD_split(a,ah,al); QD_split(b,bh,bl);\
 z1=ah*bh; z2=z1-p; z1=ah*bl; z3=al*bh; z4=z1+z3; z1=z2+z4; z3=al*bl; e=z1+z3;}


double QD_mul(double *i,double *j,double *o)
{
  double a0,a1,b1,b2,c1,c2,d2,d3,e2,e3,f2,f3;
  double g3,h1,h2,h3,k2,k3,l2,l3,m2,m3,n2,n3,p2,p3;
  double t1,t2,t3;
  double a2, a3,o0;
  double val;

  QD_prod(i[0],j[0],a0,a1); 
  QD_prod(i[0],j[1],b1,b2);
  QD_prod(i[1],j[0],c1,c2); 
  QD_prod(i[0],j[2],d2,d3);
  QD_prod(i[2],j[0],e2,e3); 
  QD_prod(i[1],j[1],f2,f3);
  g3=i[0]*j[3]+i[3]*j[0]; 
  QD_sum(a1,b1,t1,t2); 
  QD_sum(c1,t1,h1,t3); 
  QD_sum(t2,t3,h2,h3);
  QD_sum(b2,c2,k2,k3); 
  QD_sum(d2,e2,l2,l3); 
  QD_sum(f2,h2,m2,m3);
printf("g3  = %lx\n", g3); 
printf("i[1]= %lx\n", i[1]); 
printf("i[2]= %lx\n", i[2]); 
printf("j[1]= %lx\n", j[1]); 
printf("j[2]= %lx\n", j[2]); 
  g3+=(i[1]*j[2]+i[2]*j[1]); 
val = g3;  /* printing g3 here makes the bug disappear, so use return */
  QD_sum(k2,l2,n2,n3); 
  QD_sum(m2,n2,p2,p3);
  g3+=d3+e3+f3+h3+k3+l3+m3+n3+p3; 
  QD_qsum(p2,g3,a2,a3); 
  QD_qsum(h1,a2,b1,b2); 
  QD_qsum(a0,b1,o0,c1);
  o[0]=o0; 
  QD_qsum(c1,b2,o[1],d2); 
  QD_qsum(d2,a3,o[2],o[3]);
  return val;
}

void errorit(S) char *S; {printf("**ERROR** %s\n",S); exit(-1);}

int main()
{
  double x[4]; 
  double val;
  /* This fpu_control code should set the control
   word of the floating point processor to round to an 
   IEEE-754 double (53-bit mantissa, 64-bits in total), rather
   than the default extended precision

   However the bug also occurs if this fpu_control code is
   removed or commented out.
  */
  fpu_control_t fpu_control=0x027f; _FPU_SETCW(fpu_control);

  val = QD_mul(QD_pi,QD_e,x);
printf("val = %lx\n", val);
printf("%1.20f\n", x[0]);
printf("%lx\n", x[0]);
  if (x[0]!=8.53973422267356774285) errorit("QD_check failed at x[0]");
  if (x[1]!=-6.7738152905024242803e-16) errorit("QD_check failed at x[1]");
  if (x[2]!=1.6082340642907151632e-32) errorit("QD_check failed at x[2]");
  return 0;
}


[Bug c/48949] New: gcc-4.6.0 regression with complex.h on i386-pc-solaris2.10

2011-05-10 Thread mariah.lenox at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48949

   Summary: gcc-4.6.0 regression with complex.h on
i386-pc-solaris2.10
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mariah.le...@gmail.com


/* gcc-4.6.0 regression with complex.h on i386-pc-solaris2.10

% gcc -c foo.c
foo.c: In function ‘foo’:
foo.c:5:11: error: ‘_Imaginary_I’ undeclared (first use in this function)
foo.c:5:11: note: each undeclared identifier is reported only once for each
function it appears in
%
% gcc-4.5.1 -c foo.c
%
% gcc -v 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.6.0/x86_64-SunOS-core2/libexec/gcc/i386-pc-solaris2.10/4.6.0/lto-wrapper
Target: i386-pc-solaris2.10
Configured with: /usr/local/gcc-4.6.0/src/gcc-4.6.0/configure
--enable-languages=c,c++,fortran --with-gnu-as
--with-as=/usr/local/binutils-2.21/x86_64-SunOS-gccc-4.5.1/bin/as --with-gnu-ld
--with-ld=/usr/local/binutils-2.21/x86_64-SunOS-gccc-4.5.1/bin/ld
--with-gmp=/usr/local/mpir-2.3.0/x86_64-SunOS-core2-gcc-4.5.1-abi32
--with-mpfr=/usr/local/mpfr-3.0.0/x86_64-SunOS-core2-mpir-2.3.0-gcc-4.5.1-abi32
--with-mpc=/usr/local/mpc-0.9/x86_64-SunOS-core2-mpir-2.3.0-mpfr-3.0.0-gcc-4.5.1-abi32
--prefix=/usr/local/gcc-4.6.0/x86_64-SunOS-core2
Thread model: posix
gcc version 4.6.0 (GCC) 
%
*/

#include 

double _Complex
foo () {
   return I;
}


[Bug c/48949] gcc-4.6.0 regression with complex.h on i386-pc-solaris2.10

2011-05-10 Thread mariah.lenox at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48949

Mariah Lenox  changed:

   What|Removed |Added

 Target||i386-pc-solaris2.10
  Known to work||4.5.1
   Host||i386-pc-solaris2.10
  Known to fail||4.6.0
  Build||i386-pc-solaris2.10
   Severity|normal  |critical

--- Comment #1 from Mariah Lenox  2011-05-10 
15:37:00 UTC ---
Found while trying to compile mpc-0.9 with gcc-4.6.0.