[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-30 Thread JaFojtik at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #21 from Jaroslav Fojtík --- Anyway, all unit tests are passing now, including this one named "struct", on all Debian duilders: https://buildd.debian.org/status/package.php?p=wp2latex&suite=sid I did not note any problem before from

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-30 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #20 from Jonathan Wakely --- (In reply to Jaroslav Fojtík from comment #0) > jara@cfarm421:~/mintest$ make > gcc -I./ -Wall -g -O2 -c struct.c -o struct.o > gcc -I./ -Wall -g -O2 -c mintest.c -o mintest.o > gcc -lm -o mintest str

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #19 from Andrew Pinski --- (In reply to Jaroslav Fojtík from comment #18) > May be that this report points to a similar bug: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116621 > > I cannot consider this to be a bug because of t

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread JaFojtik at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #18 from Jaroslav Fojtík --- May be that this report points to a similar bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116621 I cannot consider this to be a bug because of types mismatch i my case. "Normaly" the va_arg is imp

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread JaFojtik at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #17 from Jaroslav Fojtík --- The only reasonable source of this crash was that doubles are passed different way than uint64_t. May be that doubles are newly passed through different stack/pipe. Only looking to assembly might reveal d

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread noloader at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 Jeffrey Walton changed: What|Removed |Added CC||noloader at gmail dot com --- Comment

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread JaFojtik at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #15 from Jaroslav Fojtík --- When I have finished university where I has been learned C/C++ in 2000 there was no problem to typecast uint64_t* to double* or any other type I need. We were learned that this is correct ;). Now I see t

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 Sam James changed: What|Removed |Added CC||sjames at gcc dot gnu.org --- Comment #14 f

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread JaFojtik at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #13 from Jaroslav Fojtík --- Thank you for help.

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread JaFojtik at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #12 from Jaroslav Fojtík --- this solution should be correct according to documentation: typedef union { double d; uint64_t u64; } DblUint64; case 'e':{DblUint64 du; du.d = va_arg(ap,double); wri

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread vincent-gcc at vinc17 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #11 from Vincent Lefèvre --- (In reply to Jaroslav Fojtík from comment #9) > Accessing to an incompatible type throug pointer is not clean in general. > But I need here to do a dirty job to flip endianity of double type. There > are

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread JaFojtik at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #10 from Jaroslav Fojtík --- I can call 8x fwrite with 1 byte to camouflage this. It will produce slower and longer code and type punning will be only hidden. I cannot avoid this shuffle. // Needed to store double in LoE

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread JaFojtik at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #9 from Jaroslav Fojtík --- https://wiki.sei.cmu.edu/confluence/display/c/EXP39-C.+Do+not+access+a+variable+through+a+pointer+of+an+incompatible+type Accessing to an incompatible type throug pointer is not clean in general. But I ne

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread vincent-gcc at vinc17 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 Vincent Lefèvre changed: What|Removed |Added CC||vincent-gcc at vinc17 dot net --- Com

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread JaFojtik at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #7 from Jaroslav Fojtík --- Just for clarification. This worked till GCC-14 - The code has been verified and proven functionable many times: case 'e':{const uint64_t e = va_arg(ap,uint64_t); writed+=WrQWORD_LoEnd(

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread JaFojtik at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 Jaroslav Fojtík changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread tkoenig at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 Thomas Koenig changed: What|Removed |Added Keywords|ABI | --- Comment #5 from Thomas Koenig ---

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread tkoenig at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #4 from Thomas Koenig --- (In reply to Jaroslav Fojtík from comment #3) > It seems to me that this problem has something to do with memcpy optimised > for AVX, that newly requests everything to be alligned. As shown by the valgrind

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread JaFojtik at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #3 from Jaroslav Fojtík --- It seems to me that this problem has something to do with memcpy optimised for AVX, that newly requests everything to be alligned. -- <<>> (c)1998-2024

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread JaFojtik at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 --- Comment #2 from Jaroslav Fojtík --- May be that I did something wrong, but this code worked for 20 years without any problem. It has been also tested unded Borland and VisualStudio without any notable problem. I have noted problem only for

[Bug middle-end/116885] Wrong functionality of vararg causes malfunction or crashes

2024-09-29 Thread tkoenig at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116885 Thomas Koenig changed: What|Removed |Added Status|UNCONFIRMED |WAITING CC|