After recent fixes, the only patch left to be
able to build Ada on mainline is for the wrapv problems
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21959
(patch by Andreas Schwab). It works at least on x86 and x86_64-linux:
http://gcc.gnu.org/ml/gcc-testresults/2005-06/msg01590.html
http://gcc.gnu.org/ml/gcc-testresults/2005-06/msg01592.html

The Ada PR has a small test case in C showing the problem, by Andrew Pinski:

unsigned char c[0xFF];
void f(void)
{
  unsigned char i;
  c[128] = 128;
  i = 0;
  while (1)
  {
    if (((signed char) i) < 0) break;
    c[i] = ' ';
    i++;
  }
}

If no one is looking at this, may be it's better to just commit the workaround 
patch?

Laurent

Index: misc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/misc.c,v
retrieving revision 1.103
diff -u -r1.103 misc.c
--- misc.c      16 Jun 2005 09:05:06 -0000      1.103
+++ misc.c      26 Jun 2005 20:30:01 -0000
@@ -339,6 +339,8 @@
   /* Uninitialized really means uninitialized in Ada.  */
   flag_zero_initialized_in_bss = 0;

+  flag_wrapv = 1;
+
   return CL_Ada;
 }



Reply via email to