[Bug middle-end/62018] FAIL: gcc.dg/torture/ftrapv-1.c * execution test on x86_64-apple-darwin13

2014-11-08 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62018

Francois-Xavier Coudert  changed:

   What|Removed |Added

 Status|WAITING |NEW
 CC||fxcoudert at gcc dot gnu.org

--- Comment #7 from Francois-Xavier Coudert  ---
Here's a minimal reproducer:

int iaddv (int a, int b) { return a + b; }
int main (void)
{ volatile int x = iaddv (__INT_MAX__, 1); }


Compiled with gcc trunk (or 4.8 or 4.9) with option -ftrapv, it executes
without fault. If I do the same on a linux box, it traps (as it should).

However, on both the tree dumps are the same: i.e. I cannot see, from the dump
tree, where the trap checks and instructions should be. Richard, I am willing
to debug this, but don't know where to go after the above analysis.


[Bug middle-end/62018] FAIL: gcc.dg/torture/ftrapv-1.c * execution test on x86_64-apple-darwin13

2014-11-09 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62018

--- Comment #8 from Francois-Xavier Coudert  ---
(In reply to Francois-Xavier Coudert from comment #7)
> Richard, I am willing to debug this, but don't know where to go after the 
> above analysis.


I think it's a libgcc miscompilation somehow. Directly calling __addvsi3 as
follows:

int __addvsi3 (int, int);
int main (void)
{ volatile int x = __addvsi3 (__INT_MAX__, 1); }

does not abort, even though (in my understanding) it should.


[Bug middle-end/62018] FAIL: gcc.dg/torture/ftrapv-1.c * execution test on x86_64-apple-darwin13

2014-08-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62018

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2014-08-05
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Can you please investigate a bit yourself?  The test relies on fork()/wait()
to work and properly return the exit status of the forked process.


[Bug middle-end/62018] FAIL: gcc.dg/torture/ftrapv-1.c * execution test on x86_64-apple-darwin13

2014-08-05 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62018

--- Comment #2 from Dominique d'Humieres  ---
> Can you please investigate a bit yourself?  The test relies on fork()/wait()
> to work and properly return the exit status of the forked process.

Where should I start?


[Bug middle-end/62018] FAIL: gcc.dg/torture/ftrapv-1.c * execution test on x86_64-apple-darwin13

2014-08-05 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62018

--- Comment #4 from Dominique d'Humieres  ---
> With a debugger?

Yerk!-(


[Bug middle-end/62018] FAIL: gcc.dg/torture/ftrapv-1.c * execution test on x86_64-apple-darwin13

2014-08-05 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62018

--- Comment #3 from rguenther at suse dot de  ---
On Tue, 5 Aug 2014, dominiq at lps dot ens.fr wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62018
> 
> --- Comment #2 from Dominique d'Humieres  ---
> > Can you please investigate a bit yourself?  The test relies on fork()/wait()
> > to work and properly return the exit status of the forked process.
> 
> Where should I start?

With a debugger?


[Bug middle-end/62018] FAIL: gcc.dg/torture/ftrapv-1.c * execution test on x86_64-apple-darwin13

2014-08-05 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62018

--- Comment #5 from Dominique d'Humieres  ---
If I remove the attribute 'no clone', the test succeeds with clang, but fails
with at least gcc 4.8.3, 4.9.1, and trunk.


[Bug middle-end/62018] FAIL: gcc.dg/torture/ftrapv-1.c * execution test on x86_64-apple-darwin13

2014-08-20 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62018

--- Comment #6 from Dominique d'Humieres  ---
Created attachment 33367
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33367&action=edit
Preprocessed and assembly files for gcc and clang

Preprocessed and assembly files for gcc (ftrapv-1_gcc.(i|s)) and clang
(ftrapv-1_clang.(i|s)).