public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/34966]  New: ICE: verify_ssa fails when optimization trigonometric code
@ 2008-01-25  3:13 dougkwan at google dot com
  2008-01-25  4:03 ` [Bug tree-optimization/34966] [4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dougkwan at google dot com @ 2008-01-25  3:13 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-25 12:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-25  3:13 [Bug c/34966] New: ICE: verify_ssa fails when optimization trigonometric code dougkwan at google dot com
2008-01-25  4:03 ` [Bug tree-optimization/34966] [4.3 Regression] " pinskia at gcc dot gnu dot org
2008-01-25  7:50 ` pinskia at gcc dot gnu dot org
2008-01-25  8:28 ` dougkwan at google dot com
2008-01-25 10:09 ` rguenth at gcc dot gnu dot org
2008-01-25 12:29 ` rguenth at gcc dot gnu dot org
2008-01-25 12:32 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).