This is the mail archive of the gcc-bugs@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]

[Bug c/34966] New: ICE: verify_ssa fails when optimization trigonometric code


I got an internal compiler error when compiling the following.  The function
my_atan is actaully derived from aton expanded from a C libray header. Other
then its name, it is almost identical to atan().


dougkwan@f666g:~/delta-2006.08.03/verify_ssa$ ./gcc -O2 PJ_geos.4.c 
PJ_geos.4.c: In function 'e_forward':
PJ_geos.4.c:22: error: definition in block 2 follows the use
for SSA_NAME: result_9 in statement:
sincostmp.17_15 = __builtin_cexpi (result_9);
PJ_geos.4.c:22: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

--------------------
extern double hypot (double, double);
extern double cos (double);
extern double sin (double);

double
my_atan (double x)
{
  register double result;
  asm volatile ("fld1; fpatan"
                : "=t" (result)
                : "0" (x)
                : "st(1)");
  return result;
}

typedef struct {
   double phi;
} LP;

void
e_forward(LP lp, double x)
{
  lp.phi = my_atan (x);
  x = hypot(cos (lp.phi), sin (lp.phi));
}
---------------------


-- 
           Summary: ICE: verify_ssa fails when optimization trigonometric
                    code
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dougkwan at google dot com
 GCC build triplet: i686-unknown-linux-gnu
  GCC host triplet: i686-unknown-linux-gnu
GCC target triplet: i686-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34966


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