[Bug target/114566] Misaligned vmovaps when compiling libvorbis for znver4

2024-04-02 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114566 --- Comment #7 from Yuxuan Shui --- Looks similar to Bug 110027, but ASAN is not involved here.

[Bug target/114566] Misaligned vmovaps when compiling libvorbis for znver4

2024-04-02 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114566 --- Comment #5 from Yuxuan Shui --- And -fstack-protector-strong is needed.

[Bug target/114566] Misaligned vmovaps when compiling libvorbis for znver4

2024-04-02 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114566 --- Comment #4 from Yuxuan Shui --- Reduced a bit further: void setup_tone_curves(float binHz, float center_decay_rate) { float workc[8][56]; memset(workc, 0, sizeof(workc)); for (int j = 0; j < 8; j++) { for (int k = 0; k < 56;

[Bug target/114566] Misaligned vmovaps when compiling libvorbis for znver4

2024-04-02 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114566 --- Comment #3 from Yuxuan Shui --- Roughly reduced example: #include #include #define toOC(n) (log(n)*1.442695f-5.965784f) float *setup_tone_curves(float binHz, float center_decay_rate) { float workc[8][56];

[Bug target/114566] Misaligned vmovaps when compiling libvorbis for znver4

2024-04-02 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114566 --- Comment #2 from Yuxuan Shui --- /nix/store/qp3k692bxjhlzvsdqpq7mdylfyr7i1ln-gcc-wrapper-13.2.0/bin/gcc -I/tmp/vorbis/include -I/tmp/vorbis/lib -O3 -march=znver4 -mtune=znver4 -g -o psy.c.o -c /tmp/vorbis/lib/psy.c -v Using built-in specs.

[Bug c/114566] New: Misaligned vmovaps when compiling libvorbis for znver4

2024-04-02 Thread yshuiv7 at gmail dot com via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: yshuiv7 at gmail dot com Target Milestone: --- Haven't tried to minimize it yet, but here is how to reproduce it: 1. Download libvorbis 1.3.7 source: https://github.com/xiph/vorbis/tree/v1.3.7 2. Configure

[Bug tree-optimization/113551] [13 Regression] Miscompilation with -O1 -fno-strict-overflow

2024-01-23 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113551 --- Comment #18 from Yuxuan Shui --- (In reply to Andrew Pinski from comment #17) > (In reply to Yuxuan Shui from comment #16) > > ... > > So -fno-strict-overflow does -fno-wrapv-pointer so we can assume pointer > arithmetic wraps now and then

[Bug tree-optimization/113551] [13 Regression] Miscompilation with -O1 -fno-strict-overflow

2024-01-23 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113551 --- Comment #16 from Yuxuan Shui --- (In reply to Andrew Pinski from comment #13) > (In reply to Yuxuan Shui from comment #12) >> ... > > Except that is undefined ... > Manually unswitching introduces the undefined behavior in the code. > So

[Bug tree-optimization/113551] [13 Regression] Miscompilation with -O1 -fno-strict-overflow

2024-01-23 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113551 --- Comment #15 from Yuxuan Shui --- (In reply to Marek Polacek from comment #14) > I don't see a complete testcase that I could bisect. Please use the code sample in the original comment. since there are questions that the manually unswitched

[Bug tree-optimization/113551] [13 Regression] Miscompilation with -O1 -fno-strict-overflow

2024-01-23 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113551 --- Comment #12 from Yuxuan Shui --- I think this is the MRE: void bug(struct obj *dso) { if (>i) { if (dso == (void *)0) return; assert_not_null(dso); } }

[Bug tree-optimization/113551] [13 Regression] Miscompilation with -O1 -fno-strict-overflow

2024-01-23 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113551 --- Comment #11 from Yuxuan Shui --- reduced it a bit: void bug(struct obj **root, struct obj *dso) { if (>i) { while (1) { struct obj *this = *root; if (dso == (void

[Bug tree-optimization/113551] [13 Regression] Miscompilation with -O1 -fno-strict-overflow

2024-01-23 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113551 --- Comment #10 from Yuxuan Shui --- the manually unswitched version can probably be reduced further.

[Bug tree-optimization/113551] [13 Regression] Miscompilation with -O1 -fno-strict-overflow

2024-01-23 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113551 Yuxuan Shui changed: What|Removed |Added Summary|[13 Regression] |[13 Regression]

[Bug rtl-optimization/113551] Miscompilation with -O1 -funswitch-loops -fno-strict-overflow

2024-01-22 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113551 --- Comment #2 from Yuxuan Shui --- regression from 12.3 -> 13.2

[Bug rtl-optimization/113551] Miscompilation with -O1 -funswitch-loops -fno-strict-overflow

2024-01-22 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113551 --- Comment #1 from Yuxuan Shui --- code is reduced from perf, source file util/dsos.c

[Bug rtl-optimization/113551] New: Miscompilation with -O1 -funswitch-loops -fno-strict-overflow

2024-01-22 Thread yshuiv7 at gmail dot com via Gcc-bugs
Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: yshuiv7 at gmail dot com Target Milestone: --- Code: struct obj { int __pad; int i; }; /* aborts when called with NULL */ int assert_not_null(void

[Bug libgcc/106674] New: Potential for symbol conflicts between libgcc_s and libunwind

2022-08-18 Thread yshuiv7 at gmail dot com via Gcc-bugs
Priority: P3 Component: libgcc Assignee: unassigned at gcc dot gnu.org Reporter: yshuiv7 at gmail dot com Target Milestone: --- libunwind and ligcc_s provides the same set of symbols, if an application depends on both, then in very specific scenarios, conflicts

[Bug libstdc++/96817] __cxa_guard_acquire unsafe against dynamically loaded pthread

2020-09-25 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96817 --- Comment #16 from Yuxuan Shui --- But yeah, that's definitely a bug in itself as well.

[Bug libstdc++/96817] __cxa_guard_acquire unsafe against dynamically loaded pthread

2020-09-25 Thread yshuiv7 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96817 --- Comment #15 from Yuxuan Shui --- (In reply to Jonathan Wakely from comment #13) > (In reply to Yuxuan Shui from comment #1) > > Example: > > > > This program normally deadlocks when using linked pthread: > > > >

[Bug libstdc++/96817] __cxa_guard_acquire unsafe against dynamically loaded pthread

2020-08-27 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96817 --- Comment #9 from Yuxuan Shui --- (In reply to Jonathan Wakely from comment #7) > It will work when Glibc defines all the pthread functions in libc.so and > libpthread.so becomes empty. Won't that mean libstdc++ will always use the

[Bug libstdc++/96817] __cxa_guard_acquire unsafe against dynamically loaded pthread

2020-08-27 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96817 --- Comment #6 from Yuxuan Shui --- I meant to say "Is there anything ... can do, to improve the situation?"

[Bug libstdc++/96817] __cxa_guard_acquire unsafe against dynamically loaded pthread

2020-08-27 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96817 --- Comment #5 from Yuxuan Shui --- (In reply to Richard Biener from comment #4) > it's been always that way - but yes, people repeatedly fall into this trap If there anything libstdc++, or maybe the middle man (Mesa in my case) can do, to

[Bug libstdc++/96817] __cxa_guard_acquire unsafe against dynamically loaded pthread

2020-08-27 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96817 --- Comment #3 from Yuxuan Shui --- (In reply to Jonathan Wakely from comment #2) > Dynamically loading libpthread breaks everything in libstdc++, it just isn't > supported. But it has real use cases, e.g. writing a C++ OpenGL program that

[Bug libstdc++/96817] __cxa_guard_acquire unsafe against dynamically loaded pthread

2020-08-27 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96817 --- Comment #1 from Yuxuan Shui --- Example: This program normally deadlocks when using linked pthread: https://godbolt.org/z/Yrza4e But it will throw recursive_init_error when using dlopen'd pthread: https://godbolt.org/z/afMe5d

[Bug libstdc++/96817] New: __cxa_guard_acquire unsafe against dynamically loaded pthread

2020-08-27 Thread yshuiv7 at gmail dot com
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: yshuiv7 at gmail dot com Target Milestone: --- If pthread is loaded dynamically via dlopen() after libstdc++ is loaded, __gthread_active_p() would return wrong result, cause guard

[Bug target/94391] gcc refers to absolute symbols with R_X86_64_PC32 relocation

2020-03-30 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94391 Yuxuan Shui changed: What|Removed |Added Resolution|INVALID |FIXED --- Comment #22 from Yuxuan Shui

[Bug target/94391] gcc refers to absolute symbols with R_X86_64_PC32 relocation

2020-03-30 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94391 --- Comment #20 from Yuxuan Shui --- (In reply to Andrew Pinski from comment #18) > (In reply to Yuxuan Shui from comment #17) > > Sorry, I am here to report a bug, not to find a workaround for my use case. > > I gave you the correct usage for

[Bug target/94391] gcc refers to absolute symbols with R_X86_64_PC32 relocation

2020-03-30 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94391 Yuxuan Shui changed: What|Removed |Added Resolution|WORKSFORME |--- Status|RESOLVED

[Bug target/94391] gcc refers to absolute symbols with R_X86_64_PC32 relocation

2020-03-30 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94391 --- Comment #17 from Yuxuan Shui --- (In reply to H.J. Lu from comment #16) > (In reply to Yuxuan Shui from comment #15) > > Your code is going to dereference the value stored in the ABS symbol as an > > address (e.g. if the symbol has value 10,

[Bug target/94391] gcc refers to absolute symbols with R_X86_64_PC32 relocation

2020-03-30 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94391 --- Comment #15 from Yuxuan Shui --- (In reply to H.J. Lu from comment #12) > (In reply to Yuxuan Shui from comment #11) > > (In reply to Andrew Pinski from comment #8) > > > Also it is wrong for a person to assume a normal C variable could be >

[Bug target/94391] gcc refers to absolute symbols with R_X86_64_PC32 relocation

2020-03-30 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94391 --- Comment #11 from Yuxuan Shui --- (In reply to Andrew Pinski from comment #8) > Also it is wrong for a person to assume a normal C variable could be > SHN_ABS; that is the bug here. It is a bug in the user code. > I showed up to fix it by

[Bug target/94391] gcc refers to absolute symbols with R_X86_64_PC32 relocation

2020-03-29 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94391 Yuxuan Shui changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID

[Bug other/94391] New: gcc refers to absolute symbols with R_X86_64_PC32 relocation

2020-03-29 Thread yshuiv7 at gmail dot com
Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: yshuiv7 at gmail dot com Target Milestone: --- Test case: Source file (a.c): extern char _binary_a_c_size[]; unsigned long foo() { return (unsigned long)_binary_a_c_size; } Run

[Bug target/87421] GCC generates unaligned movdqa

2018-09-24 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87421 Yuxuan Shui changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/87421] GCC generates unaligned movdqa

2018-09-24 Thread yshuiv7 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87421 --- Comment #1 from Yuxuan Shui --- FYI, clang/llvm correctly generates movups instruction for the read.

[Bug target/87421] New: GCC generates unaligned movdqa

2018-09-24 Thread yshuiv7 at gmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: yshuiv7 at gmail dot com Target Milestone: --- C++ Test case: struct A { unsigned int a1; long a5; unsigned int a6; }; int fun(A *res); int fun2(A *desc) { A resource; fun(); *desc

[Bug lto/56088] [4.8/4.9 Regression] LTO error: error: inlining failed in call to always_inline ‘vswprintf’: recursive inlining

2014-02-15 Thread yshuiv7 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56088 Yuxuan Shui yshuiv7 at gmail dot com changed: What|Removed |Added CC||yshuiv7 at gmail