[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2023-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2021-08-22 00:00:00 |2023-6-5 --- Comment #29 from Andrew

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-16 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #28 from joseph at codesourcery dot com --- On Thu, 16 Jun 2016, ch3root at openwall dot com wrote: > > All these memory model issues would best be raised directly with WG14, > > What is the best way to do it? If your National

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-15 Thread ch3root at openwall dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #27 from Alexander Cherepanov --- On 06/12/2016 01:09 AM, joseph at codesourcery dot com wrote: >>> C11 does not >>> consider sNaNs, and TS 18661 is explicitly stating otherwise for them. >> >> You are talking about C11 + TS 18661

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-11 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #26 from joseph at codesourcery dot com --- On Sat, 11 Jun 2016, ch3root at openwall dot com wrote: > > C11 does not > > consider sNaNs, and TS 18661 is explicitly stating otherwise for them. > > You are talking about C11 + TS

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-11 Thread ch3root at openwall dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #25 from Alexander Cherepanov --- On 06/10/2016 12:18 AM, joseph at codesourcery dot com wrote: >> > For *scalar* assignment that would be fine because of TS 18661-1 saying >> > "Whether C assignment (6.5.16) (and conversion as

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-10 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #24 from rguenther at suse dot de --- On Fri, 10 Jun 2016, ubizjak at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 > > --- Comment #21 from Uroš Bizjak --- > (In reply to Uroš Bizjak from comment #19)

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-10 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #23 from Uroš Bizjak --- (In reply to Uroš Bizjak from comment #21) > BTW: This is preexisting problem, on 64bit target we can trigger the issue > with transparent unions with: Followup in PR71486.

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-10 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #22 from Richard Biener --- (In reply to Alexander Cherepanov from comment #12) > On 2016-06-09 11:22, rguenth at gcc dot gnu.org wrote: > > Would be nice to have a testcase for the SRA case as well. > > Source code: > >

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-10 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #21 from Uroš Bizjak --- (In reply to Uroš Bizjak from comment #19) > Following test doesn't compile with patched compiler: BTW: This is preexisting problem, on 64bit target we can trigger the issue with transparent unions with:

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-10 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #20 from rguenther at suse dot de --- On Fri, 10 Jun 2016, ubizjak at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 > > --- Comment #19 from Uroš Bizjak --- > (In reply to Uroš Bizjak from comment #18)

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-10 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #19 from Uroš Bizjak --- (In reply to Uroš Bizjak from comment #18) > (In reply to rguent...@suse.de from comment #17) > > But this also hints at the ABI for > > > > void foo (union U { int x; float y; }); > > > > changing with the

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-10 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #18 from Uroš Bizjak --- (In reply to rguent...@suse.de from comment #17) > But this also hints at the ABI for > > void foo (union U { int x; float y; }); > > changing with the patch, no? Or ultimatively at the FE using a bogus >

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-10 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #17 from rguenther at suse dot de --- On Thu, 9 Jun 2016, ubizjak at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 > > --- Comment #13 from Uroš Bizjak --- > (In reply to Richard Biener from comment #7)

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #16 from joseph at codesourcery dot com --- I've now raised the void context issue on the WG14 reflector .

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #15 from joseph at codesourcery dot com --- On Thu, 9 Jun 2016, ch3root at openwall dot com wrote: > > For *scalar* assignment that would be fine because of TS 18661-1 saying > > "Whether C assignment (6.5.16) (and conversion as

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread ch3root at openwall dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #14 from Alexander Cherepanov --- On 2016-06-08 20:49, joseph at codesourcery dot com wrote: >> - sNaNs are turned into qNaNs on x86-32 if traps are turned off. Probably ok if >> sNaNs and qNaNs are considered different

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #13 from Uroš Bizjak --- (In reply to Richard Biener from comment #7) > Oh - I hope TYPE_MODE does not affect the ABI here ;) You might want to > double-check that (struct-layout tests plus call ABI) The patch introduces one

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread ch3root at openwall dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #12 from Alexander Cherepanov --- On 2016-06-09 11:22, rguenth at gcc dot gnu.org wrote: > Would be nice to have a testcase for the SRA case as well. Source code:

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #11 from joseph at codesourcery dot com --- On Thu, 9 Jun 2016, ch3root at openwall dot com wrote: > - mere load (e.g. from a volatile var) of a float or double sNaN traps > on x86-32 when traps are enabled; It raises an

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread ch3root at openwall dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #10 from Alexander Cherepanov --- On 2016-06-08 20:47, pinskia at gcc dot gnu.org wrote: > --- Comment #1 from Andrew Pinski --- > I think this is really a dup of bug 57484. The problem is x87 related and > there is not much to be

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #9 from Uroš Bizjak --- (In reply to jos...@codesourcery.com from comment #8) > It's not correct to use flag_signaling_nans for a fix. > flag_signaling_nans is only for cases where a bit-pattern for a signaling > NaN is

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #8 from joseph at codesourcery dot com --- It's not correct to use flag_signaling_nans for a fix. flag_signaling_nans is only for cases where a bit-pattern for a signaling NaN is interpreted as a floating-point value. It's not

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #7 from Richard Biener --- (In reply to Richard Biener from comment #6) > (In reply to Uroš Bizjak from comment #5) > > Following patch fixes the failure: > > > > --cut here-- > > diff --git a/gcc/config/i386/i386.c

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 Richard Biener changed: What|Removed |Added CC||jamborm at gcc dot gnu.org,

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 Uroš Bizjak changed: What|Removed |Added CC||jsm28 at gcc dot gnu.org --- Comment #5

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #4 from Uroš Bizjak --- (In reply to Richard Biener from comment #3) > It looks like RTL expansion uses DFmode to copy the aggregate which is likely > because the backend (or stor-layout.c) assigns DFmode to struct s. A similar >

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 Richard Biener changed: What|Removed |Added Keywords||wrong-code

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-08 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #2 from joseph at codesourcery dot com --- On Wed, 8 Jun 2016, ch3root at openwall dot com wrote: > - padding in long double is not copied. Probably ok (in the same way as > padding > in substructures is not always copied); Yes, I

[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

2016-06-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 --- Comment #1 from Andrew Pinski --- I think this is really a dup of bug 57484. The problem is x87 related and there is not much to be done.