I think I can get it to fall back to -O1 which safe when it fails the test , 
but I don't know how to get it to add a flag if it fails a test , only how to 
remove a flag if it fails a test, or we can just print a error message in 
configure to say to use -fno-strict-aliasing

I think a fallback to -O1 is best

Jason

-------------------------------------------------------------------------


I imagine the performance hit is minimal . We have a simple testcase

int __attribute__((noinline))
foo(int i)
{
  int *p = __builtin_malloc (4 * sizeof(int));
  *p = 0;
  p[i] = 1;
  return *p;
}
extern void abort (void);
int main()
{
  if (foo(0) != 1)
    abort ();
  return 0;
}

So we can reject the bad debian gcc-4.3.2 only , but I'm not sure how to get it 
to select no-strict-aliasing if it fails the test.


Jason


----------------------------
Thanks for the information. I am forwarding this to mpir-devel to see
what Jason thinks about possibly disabling '-fstrict-aliasing'
upstream for builds on Debian gcc 4.3.2.

I wonder how much of a performance hit is involved.

Bill.

On 9 May 2012 16:23, leif <not.rea...@online.de> wrote:
> Jeroen Demeyer wrote:
>>
>> On 2012-05-06 23:22, Alexander Dreyer wrote:
>>>
>>> Hi!
>>> built and made ptestlong sucessfully on SuSE Enterprise 11.
>>>
>>> But I had to hack mpir to accept gcc 4.3.2 64bits: configure had
>>> hard-coded not to build on this platform, because the original gcc 4.3.2
>>> was buggy, but mine is patched. (The mpir guys do not test the actual
>>> bug, but just look for gcc's version.)
>>
>>
>> I agree, hardcoding that bad version isn't a good idea.  Also because
>> MPIR might just work well enough to build GCC.
>
>
> Turns out that apparently only Debian's GCC 4.3.2 is affected (not vanilla
> FSF), and only if '-fstrict-aliasing' is enabled (which is the case with
> '-O2'.)
>
> See:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524472
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36765
>
>
> So we should probably patch MPIR's 'configure'.
>
>
> -leif
>
>
> --
> () The ASCII Ribbon Campaign
> /\   Help Cure HTML E-Mail
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-release" group.
> To post to this group, send email to sage-rele...@googlegroups.com.
> To unsubscribe from this group, send email to
> sage-release+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sage-release?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to