------- Additional Comments From jgrimm2 at us dot ibm dot com  2004-11-10 
22:50 -------
Testcase reduced from the mesa context.c file.

Compiling this with -O2 segfaults on linux-powerpc64 segfaults.


typedef unsigned int size_t;
extern void *malloc (size_t __size) __attribute__ ((__malloc__));
extern void abort(void);

struct _abc {
  int ebc;
};

void xxx ( float rscale,
           float gscale,
           float bscale,
           float ascale)
{
   struct _abc *vis;

   if (rscale > 255.0) abort();
   if (gscale > 255.0) abort();
   if (bscale > 255.0) abort();
   if (ascale > 255.0) abort();

   vis = (struct _abc *) malloc(sizeof(struct _abc) );

   if (rscale==255.0F && gscale==255.0F
     && bscale==255.0F && ascale==255.0F) {
     vis->ebc = 1;
   }

}


 



-- 


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

Reply via email to