[Bug target/119386] [14/15 Regression][x64] Shared libraries can no longer be compiled with profiling

2025-03-21 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119386 --- Comment #33 from Franz Sirl --- Yes, that works. Now the only question remains whether PLT or GOT is the right thing to do for mcount. I still wonder if there is too much guessing going on here and if reusing common flags is the right thing

[Bug target/119386] [14/15 Regression][x64] Shared libraries can no longer be compiled with profiling

2025-03-20 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119386 --- Comment #27 from Franz Sirl --- Maybe silly question, but since the changelog is only talking about __fentry__, why couldn't you make the decision based on flag_fentry?

[Bug target/119386] [14/15 Regression][x64] Shared libraries can no longer be compiled with profiling

2025-03-20 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119386 Franz Sirl changed: What|Removed |Added CC||rguenth at gcc dot gnu.org --- Comment #7

[Bug target/119386] [14/15 Regression][x64] Shared libraries can no longer be compiled with profiling

2025-03-20 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119386 --- Comment #4 from Franz Sirl --- > Note that the GCC man page is pretty clear about this: > > -mdirect-extern-access > -mno-direct-extern-access > > Do not use or use GOT to access external symbols. The default is > -mno-direct-extern-acces

[Bug target/119386] [14/15 Regression][x64] Shared libraries can no longer be compiled with profiling

2025-03-20 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119386 --- Comment #3 from Franz Sirl --- The option -mdirect-extern-access is enabled by default since it was added in r12-7126-ab0b5fbfe90168d2e470aefb19e0cf31526290bc . I didn't even know about this option before I ran into this problem.

[Bug target/119386] New: [14/15 Regression][x64] Shared libraries can no longer be compiled with profiling

2025-03-20 Thread sirl at gcc dot gnu.org via Gcc-bugs
Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Hi, compiling even the simplest code to a shared library with profiling is broken since r14-811

[Bug sanitizer/117259] [12/13/14/15 Regression] warning: 'j.6' may be used uninitialized [-Wmaybe-unitialized] with -fsanitize=undefined

2024-10-22 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117259 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #5

[Bug c++/116449] Miscompilation and missing bounds check with UBSAN with pointer to member functions and array accesses

2024-10-02 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116449 --- Comment #11 from Franz Sirl --- The fix works nicely here, thanks! As a fun fact, we gain a warning for this likely undefined code: ``` class BaseC { public: virtual ~BaseC() {} }; class C : public BaseC { public: virtual

[Bug c++/116533] New: Possibly missing SAVE_EXPR in get_member_function_from_ptrfunc()

2024-08-29 Thread sirl at gcc dot gnu.org via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- This came up during the discussion of PR 116449. get_member_function_from_ptrfunc() generates a statement with repeated expressions, but

[Bug c++/116449] Miscompilation and missing bounds check with UBSAN with pointer to member functions and array accesses

2024-08-24 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116449 --- Comment #5 from Franz Sirl --- This small change fixes the bug and passes bootstrap and regtests on x86_64. --- a/gcc/cp/typeck.cc +++ b/gcc/cp/typeck.cc @@ -4195,7 +4195,7 @@ get_member_function_from_ptrfunc (tree *instance_ptrptr, tree fu

[Bug c++/116449] Miscompilation and missing bounds check with UBSAN with pointer to member functions and array accesses

2024-08-22 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116449 --- Comment #3 from Franz Sirl --- Isn't the missing bounds check on parr[c] on purpose? It's added with -fsanitize=bounds-strict.

[Bug sanitizer/116449] New: Miscompilation with UBSAN

2024-08-21 Thread sirl at gcc dot gnu.org via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org Target Milestone: --- Hi, compiling this example with g++-trunk -c

[Bug tree-optimization/110458] [14/15 Regression] -Warray-bounds=2 new false positive

2024-07-26 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110458 --- Comment #5 from Franz Sirl --- I wrongly added c#3 here, should have been PR 105690, sorry!

[Bug ipa/105690] [12/13/14/15 regression] -Warray-bounds sensitive false positive with -O2

2024-07-26 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105690 --- Comment #4 from Franz Sirl --- The testcode started to fail with the backwards jump threader rewrite in r12-2591-g2e96b5f14e4025691b57d2301d71aa6092ed44bc and a simple -Warray-bounds. This is proven by the fact that compiling the testcase wi

[Bug c/68845] -Werror=array-bounds=[12] doesn't turn warning into error

2024-06-13 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68845 Franz Sirl changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug sanitizer/112727] New: UBSAN creates GIMPLE path with uninitialized variable

2023-11-27 Thread sirl at gcc dot gnu.org via Gcc-bugs
Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org Target Milestone

[Bug gcov-profile/111559] [14 regression] ICE when building Python with PGO

2023-09-28 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111559 --- Comment #8 from Franz Sirl --- The proposed patch on top of r14-4307 fixes the profiled bootstrap here.

[Bug gcov-profile/111559] [14 regression] ICE when building Python with PGO

2023-09-24 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111559 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #3

[Bug ipa/111283] [14 Regression] gnat profilebootstrap broken on trunk 20230902 on 32bit targets

2023-09-14 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111283 --- Comment #8 from Franz Sirl --- I see a similar profiledbootstrap failing with x86_64-linux-gnu: /home/fsirl/rpmbuild/BUILD/gcc-14.0.0+gitr14+3924/obj-x86_64-suse-linux/./prev-gcc/xg++ -B/home/fsirl/rpmbuild/BUILD/gcc-14.0.0+gitr14+3924/obj-

[Bug ipa/111283] [14 Regression] gnat profilebootstrap broken on trunk 20230902 on 32bit targets

2023-09-14 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111283 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #7

[Bug tree-optimization/110458] [14 Regression] -Warray-bounds=2 new false positive

2023-08-09 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110458 --- Comment #3 from Franz Sirl --- Actually Comment 2 is only true for the original testcode (which was quite fragile to reproduce). The reduced testcode started to fail with the backwards jump threader rewrite in r12-2591-g2e96b5f14e4025691b57d

[Bug middle-end/110857] aarch64-linux-gnu profiledbootstrap broken

2023-08-02 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110857 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #2

[Bug tree-optimization/110496] ICE: tree check: expected none of vector_type, have vector_type in find_bswap_or_nop_1, at gimple-ssa-store-merging.cc:654

2023-06-30 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110496 --- Comment #2 from Franz Sirl --- Forget to mention, needs -O2 or higher to reproduce. Was exposed by r14-2150-gfe48f2651334bc4d96b6df6b2bb6b29fcb732a83 .

[Bug tree-optimization/110496] New: ICE: tree check: expected none of vector_type, have vector_type in find_bswap_or_nop_1, at gimple-ssa-store-merging.cc:654

2023-06-30 Thread sirl at gcc dot gnu.org via Gcc-bugs
Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- This testcase (reduced with cvise): long

[Bug tree-optimization/110458] -Warray-bounds=2 new false positive

2023-06-29 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110458 --- Comment #2 from Franz Sirl --- This has been exposed by commit r14-2013-gfb0447b1f6b7373f57cb3a3d17a46803cfd9909d "Hide IVOPTs strip_offset".

[Bug c/110458] New: -Warray-bounds=2 new false positive

2023-06-28 Thread sirl at gcc dot gnu.org via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 55412 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55412&action=edit testcase Since somewhere between r14-1870 and r14-2097 a new -Warray-bounds=2 false p

[Bug debug/109354] New: [arm32] Parameter stored on stack gets wrong debug info with -Og or higher

2023-03-31 Thread sirl at gcc dot gnu.org via Gcc-bugs
: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Hi, this small testcase class c1 { struct s1 { unsigned int m_n1; }; struct s2 { s1 sM1; s1 sM2; }; s2 m_s2

[Bug tree-optimization/108821] [11/12/13 Regression] LIM reissuing a violatile store when it cannot/should not

2023-02-16 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108821 Franz Sirl changed: What|Removed |Added CC||rguenther at suse dot de --- Comment #2 fr

[Bug tree-optimization/108821] New: Extra volatile access with -O2 -ftree-loop-im since GCC-11

2023-02-16 Thread sirl at gcc dot gnu.org via Gcc-bugs
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Hi, this small example extern volatile int *x; static int gCrc; static int crc16Add(int crc, int b) __attribute__((noinline

[Bug bootstrap/107182] Commit r13-2871-g1b74b5cb4e9d7191f298245063a8f9c3a1bbeff4 breaks profiledbootstrap

2022-10-07 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107182 --- Comment #1 from Franz Sirl --- Created attachment 53677 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53677&action=edit Related GCDA file

[Bug bootstrap/107182] New: Commit r13-2871-g1b74b5cb4e9d7191f298245063a8f9c3a1bbeff4 breaks profiledbootstrap

2022-10-07 Thread sirl at gcc dot gnu.org via Gcc-bugs
: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 53676 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53676&acti

[Bug ipa/105690] -Warray-bounds sensitive false positive with -O2

2022-06-10 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105690 --- Comment #3 from Franz Sirl --- I managed to minimize the testcase a bit more: unsigned int gvar1; void fun1(int); void fun2(unsigned int, char *); int fun2_maxlen; typedef struct { int exist; int mode; } table_t; table_t gtable[20]; vo

[Bug c/105690] New: -Warray-bounds sensitive false positive with -O2

2022-05-22 Thread sirl at gcc dot gnu.org via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Hi, this minimized testcase issues # gcc-12 -O2 -Warray-bounds -c testcase.c testcase.c: In function 'fun3.part.0': testcase.c:16:13: warning: array subscript

[Bug target/101393] PowerPC32 inline assembly broken by commit 2d94f7dea9c73ef3c116a0ddc722724578a860fe

2021-07-22 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101393 --- Comment #16 from Franz Sirl --- Created attachment 51199 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51199&action=edit Patch version with minimum changes against GCC10 This is the minimum version of the patch, it fixes this PR but

[Bug target/101393] PowerPC32 inline assembly broken by commit 2d94f7dea9c73ef3c116a0ddc722724578a860fe

2021-07-22 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101393 --- Comment #15 from Franz Sirl --- (In reply to Segher Boessenkool from comment #14) > (In reply to Franz Sirl from comment #12) > > The emitted .machine is easy to fix, what's not so easy to fix is the > > intention behind Segher's change that

[Bug target/101393] PowerPC32 inline assembly broken by commit 2d94f7dea9c73ef3c116a0ddc722724578a860fe

2021-07-22 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101393 --- Comment #12 from Franz Sirl --- The emitted .machine is easy to fix, what's not so easy to fix is the intention behind Segher's change that caused the wrong .machine. Consider this source compiled with -mcpu=7400: void ppcaltivecfunc (void

[Bug target/101393] PowerPC32 inline assembly broken by commit 2d94f7dea9c73ef3c116a0ddc722724578a860fe

2021-07-21 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101393 --- Comment #9 from Franz Sirl --- (In reply to Segher Boessenkool from comment #8) > I don't think it is a good idea to add workaround upon workaround to avoid > some of the not-so-useful behaviours of -many. Instead, we should just > not use

[Bug target/101393] PowerPC32 inline assembly broken by commit 2d94f7dea9c73ef3c116a0ddc722724578a860fe

2021-07-21 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101393 Franz Sirl changed: What|Removed |Added Attachment #51164|0 |1 is obsolete|

[Bug target/101393] PowerPC32 inline assembly broken by commit 2d94f7dea9c73ef3c116a0ddc722724578a860fe

2021-07-16 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101393 --- Comment #4 from Franz Sirl --- Created attachment 51164 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51164&action=edit Half-baken trial patch How about something along this patch? It's not fully done (no good idea about SPEC stuff l

[Bug target/101393] PowerPC32 inline assembly broken by commit 2d94f7dea9c73ef3c116a0ddc722724578a860fe

2021-07-16 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101393 --- Comment #3 from Franz Sirl --- (In reply to Segher Boessenkool from comment #1) > The -many is problematic, that is the whole point of this. As in this > example: on different subtargets there are different machine code > translations for t

[Bug target/91050] -mdejagnu-cpu= does not affect the -m assembler option

2021-07-12 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91050 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #17

[Bug inline-asm/101393] New: PowerPC32 inline assembly broken by commit 2d94f7dea9c73ef3c116a0ddc722724578a860fe

2021-07-09 Thread sirl at gcc dot gnu.org via Gcc-bugs
Severity: normal Priority: P3 Component: inline-asm Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- A PowerPC32 GCC configured with "--target=powerpc-unknown-eabi --enable-languages=c,c++ --with-cp

[Bug middle-end/99299] Need a recoverable version of __builtin_trap()

2021-03-01 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99299 --- Comment #8 from Franz Sirl --- (In reply to Segher Boessenkool from comment #7) > (In reply to Franz Sirl from comment #5) > > For the naming I suggest __builtin_debugtrap() to align with clang. Maybe > > with an aliased __debugbreak() on Win

[Bug middle-end/99299] Need a recoverable version of __builtin_trap()

2021-03-01 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99299 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #5

[Bug c++/99251] New: Strange -Wnonnull warning behaviour with dynamic_cast

2021-02-24 Thread sirl at gcc dot gnu.org via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- With this testcase: class cl1 { virtual void m(); }; class cl2 : public cl1 { public: int g(); int h(); int i(); }; class cl3 { cl1 *p; int g(); int h

[Bug c/99159] New: Confusing -Warray-bounds warning

2021-02-19 Thread sirl at gcc dot gnu.org via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Hi, with this minimized testcase, compiled with -O2 -Warray-bounds: struct s1 { char b[12]; }; struct s2 { int x; struct s1 y; } *pb, c; extern struct s2 *es; void test1 (int f

[Bug rtl-optimization/98144] REE needs 6GB DF memory when compiling insn-extract.c with RTL checking enabled

2021-02-04 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98144 --- Comment #13 from Franz Sirl --- Some data for the inhouse testcase in Bug 80930 with ASAN+UBSAN: gcc-9@r9-8944: OOM killed after 15min at ~85 GB gcc-10@r10-9345: takes ~25min to compile, max mem ~6.5GB Thanks for this nice improvement!

[Bug middle-end/95673] missing -Wstring-compare for an impossible strncmp test

2020-09-29 Thread sirl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95673 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #5

[Bug c/97157] [11 Regression] -Wduplicated-branches: C ICE in hash_operand, at fold-const.c:3768 since r11-3302-g3696a50beeb73f4d

2020-09-22 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97157 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #3

[Bug middle-end/97073] [8/9/10/11 Regression] Miscompilation with -m32 -O1 -march=i686

2020-09-18 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97073 --- Comment #8 from Franz Sirl --- (In reply to Jakub Jelinek from comment #4) > Created attachment 49236 [details] > gcc11-pr97073.patch > > Untested fix. I can confirm that this patch applied to the gcc-8 branch fixes the testcase and the ori

[Bug middle-end/97073] [8/9/10/11 Regression] Miscompilation with -m32 -O1 -march=i686

2020-09-18 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97073 Franz Sirl changed: What|Removed |Added Known to work|6.3.1 | --- Comment #7 from Franz Sirl --- No, my

[Bug middle-end/97073] [8/9/10/11 Regression] Miscompilation with -m32 -O1 -march=i686

2020-09-18 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97073 --- Comment #5 from Franz Sirl --- (In reply to Jakub Jelinek from comment #3) > This broke in between r102000 (still good) and r104000 (already > miscompiled), so I don't believe that 6.3.1 worked. Hmm, maybe something in 6.3.1 is masking the b

[Bug c/97073] New: Miscompilation with -m32 -O1 -march=i686

2020-09-16 Thread sirl at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 49229 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49229&action=edit Testcase demonstrating the problem. Hi, the attached simple testcase abor

[Bug c/92380] New: Bogus -Warray-bounds warning with structures

2019-11-05 Thread sirl at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 47176 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47176&action=edit testcase This code: typedef struct { char cs[256]; } inner_small

[Bug c/92290] New: Inconsistent -Warray-bounds warning

2019-10-30 Thread sirl at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 47133 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47133&action=edit testcase The attached creduced testcases recently started to warn differently in trunk

[Bug c/88993] [9 Regression] GCC 9 -Wformat-overflow=2 should reflect real libc limits

2019-02-12 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88993 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #12

[Bug tree-optimization/86532] [9 Regression] Wrong code due to a wrong strlen folding starting with r262522

2018-07-17 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86532 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #15

[Bug c/86345] New: Likely false warning with -Wstringop-overflow and memset

2018-06-28 Thread sirl at gcc dot gnu.org
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 44335 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44335&action=edit testcase The a

[Bug tree-optimization/86232] New: ICE in record_estimate, at tree-ssa-loop-niter.c:3258

2018-06-20 Thread sirl at gcc dot gnu.org
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- This short creduced snippet enum { a = 1 } b; int c() { int d = a; for (; d;) d &= d - 1; return b; } compiled with "gcc-9 -c -W -Wall

[Bug middle-end/85652] New: -Wformat-overflow warning silenced by -fpic/-fPIC

2018-05-04 Thread sirl at gcc dot gnu.org
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Target: x86_64-linux Created attachment 44070 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44070&action=edit t

[Bug middle-end/85650] Additional warnings when -fsanitize=undefined is used with -Wstringop-truncation

2018-05-04 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85650 --- Comment #1 from Franz Sirl --- Created attachment 44068 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44068&action=edit testcase 2

[Bug middle-end/85650] New: Additional warnings when -fsanitize=undefined is used with -Wstringop-truncation

2018-05-04 Thread sirl at gcc dot gnu.org
Keywords: diagnostic Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 44067 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44

[Bug middle-end/85420] More -Wrestrict false positives with -fsanitize=undefined

2018-04-16 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85420 --- Comment #3 from Franz Sirl --- Hmm, this maybe creduce'd too much, the original source reads more like strcpy(b, b + a + 10); which would be only UB for sure if strlen(b + a + 10) >= 9, or?

[Bug middle-end/85420] More -Wrestrict false positives with -fsanitize=undefined

2018-04-16 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85420 --- Comment #1 from Franz Sirl --- Created attachment 43951 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43951&action=edit C++ testcase

[Bug middle-end/85420] New: More -Wrestrict false positives with -fsanitize=undefined

2018-04-16 Thread sirl at gcc dot gnu.org
Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 43950 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43950&action=edit C t

[Bug c/85365] New: -Wrestrict false positives with -fsanitize=undefined

2018-04-11 Thread sirl at gcc dot gnu.org
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- This small testcase warns 3 time when compiled with 8.0.1@r259308: extern char a[], b[], d[]; int c, e; char *strcpy(char *, const char

[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns

2018-04-06 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 --- Comment #13 from Franz Sirl --- Yes, I can do a patch for GCC-9. Any idea for the option naming? Like -msvr4-struct-return-msb? Or should I consolidate -maix-struct-return and -msvr4-struct-return into -maggr-return-mode={aix,svr4,svr4gnu}?

[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns

2018-04-04 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762 Franz Sirl changed: What|Removed |Added Known to fail||3.1.1 --- Comment #11 from Franz Sirl ---

[Bug c/85094] New: -g with any optimization suppresses -Wduplicated-branches

2018-03-27 Thread sirl at gcc dot gnu.org
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- This small testcase doesn't warn if compiled with -g and -O1 or higher. Only "-g -O0" or for example -O2 without -g warn for the te

[Bug lto/85078] LTO ICE: tree check: expected tree that contains 'decl minimal' structure, have 'identifier_node' in decl_mangling_context, at cp/mangle.c:878

2018-03-26 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85078 --- Comment #1 from Franz Sirl --- The ICE was introduced between r257623 and r257685.

[Bug lto/85078] New: LTO ICE: tree check: expected tree that contains 'decl minimal' structure, have 'identifier_node' in decl_mangling_context, at cp/mangle.c:878

2018-03-26 Thread sirl at gcc dot gnu.org
, at cp/mangle.c:878 Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org CC: marxin at gcc dot gnu.or

[Bug sanitizer/82501] AddressSanitizer does not handle negative offset for first global variable

2018-03-14 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82501 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #3

[Bug c/84762] New: GCC for PowerPC32 violates the SysV ABI spec for small struct returns

2018-03-08 Thread sirl at gcc dot gnu.org
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Host: x86_64-linux Target: powerpc-eabi For an example like: struct smallstruct { char a; char b; char c

[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts

2018-03-02 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #2

[Bug c/84649] New: -Wstringop-truncation shouldn't warn on strncat() when 2nd argument is a char array

2018-03-01 Thread sirl at gcc dot gnu.org
IRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- With gcc-8 trunk@258093 for this example char *append_leading_digits(char *cp, int i) { char buf[16]; __builtin_sp

[Bug c/83989] New: -Wrestrict false positive with malloc-style functions

2018-01-23 Thread sirl at gcc dot gnu.org
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 43216 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43216&action=edit testcase Compiling the attached file with r256939 of trunk issues 2 w

[Bug tree-optimization/83510] [8 Regression] Recent changes for -Warray-bounds trigger false positive

2018-01-19 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83510 --- Comment #6 from Franz Sirl --- The patch in comment 5 applied to r256877 fixes the warning in both the testcase and the original code.

[Bug tree-optimization/83510] Recent changes for -Warray-bounds trigger false positive

2018-01-12 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83510 Franz Sirl changed: What|Removed |Added Known to work||6.4.0, 7.2.0 --- Comment #2 from Franz Sirl

[Bug c/83510] New: Recent changes for -Warray-bounds trigger false positive

2017-12-20 Thread sirl at gcc dot gnu.org
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 42933 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42933&action=edit testcase The attached testcase started to pr

[Bug target/82271] [5/6/7 Regression] loop gets miscompiled on powerpc at -O2

2017-09-21 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82271 --- Comment #6 from Franz Sirl --- Actually this is likely triggered by undefined behaviour. The array m_pTemp is too small for nAccessSize=4096. Increasing the array size to 1024 elements makes the bug go away. If you agree, just close the bug a

[Bug target/82271] [5/6/7 Regression] loop gets miscompiled on powerpc at -O2

2017-09-21 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82271 --- Comment #3 from Franz Sirl --- The bug was introduced with r195054: 2013-01-09 Jan Hubicka PR tree-optimiation/55875 * tree-ssa-loop-niter.c (number_of_iterations_cond): Add EVERY_ITERATION parameter. (num

[Bug target/82271] loop gets miscompiled on powerpc at -O2

2017-09-21 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82271 Franz Sirl changed: What|Removed |Added Known to work||4.5.4, 4.6.4, 4.7.4 Known to fail|

[Bug target/82271] New: loop gets miscompiled on powerpc at -O2

2017-09-20 Thread sirl at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 42211 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42211&action=edit testcase The attached testcase removes conditions in the loop when compi

[Bug c/81783] New: -Wtautological-compare could do better

2017-08-09 Thread sirl at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- This example code doesn't warn with -Wtautological-compare: int f(int a) { if ((a & 0x10) == 10) return 1; return 0; } clang warns

[Bug c/81779] New: bool define from stdbool.h suppresses -Wdeclaration-after-statement

2017-08-09 Thread sirl at gcc dot gnu.org
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- This testcase warns only once with -Wdeclaration-after-statement since at least gcc-4.8: #include bool f2(char *pRedo) { if

[Bug c/46742] -Wparentheses unexpectedly misses some cases

2017-07-17 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46742 --- Comment #5 from Franz Sirl --- Actually, after seeing a large bunch of justified warnings in our codebase with the disabled APPEARS_TO_BE_BOOLEAN_EXPR_P check, I wonder if a new option like -Wbool-bitwise-parentheses (thus not depending on th

[Bug c/46742] -Wparentheses unexpectedly misses some cases

2017-07-17 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46742 --- Comment #4 from Franz Sirl --- APPEARS_TO_BE_BOOLEAN_EXPR_P was introduced with r141340 (PR 7543), but I cannot find a discussion on why this suppression makes sense. When I disable it I only see 3 places where it triggers in trunk: gcc/cp/l

[Bug c/46742] -Wparentheses unexpectedly misses some cases

2017-07-05 Thread sirl at gcc dot gnu.org
||2017-07-05 CC||sirl at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Franz Sirl --- Still happens with 7.1.1 and trunk. clang catches both with the -Wlogical-not-parentheses option.

[Bug rtl-optimization/80930] REE pass causes high memory usage via df_mir_alloc() with ASAN+UBSAN turned on

2017-06-02 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80930 --- Comment #2 from Franz Sirl --- Further investigation shows that "-O2 -fsanitize=undefined" is enough to trigger the excessive memory usage. The big difference between GCC-6 and GCC-7 is that the function causing this has ~20 blocks in GCC

[Bug middle-end/80930] New: REE pass causes high memory usage via df_mir_alloc() with ASAN+UBSAN turned on

2017-05-31 Thread sirl at gcc dot gnu.org
: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- We have an inhouse C source where the memory usage is excessive (> 88GB, then OOM killed) with GCC-7/x86_64 (7.

[Bug driver/80828] New: Command line option -e not documented

2017-05-19 Thread sirl at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- I couldn't find (also grepping under trunk/gcc/doc) any documentation on the -e commandline option. It seems the option and it's argument are directly passed to the linker, sim

[Bug c++/46476] Missing Warning about unreachable code after return

2017-05-10 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46476 Franz Sirl changed: What|Removed |Added CC||sirl at gcc dot gnu.org --- Comment #10

[Bug sanitizer/79265] [7 regression] -fsanitize=undefined inserts unnecessary null pointer tests

2017-04-05 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79265 --- Comment #6 from Franz Sirl --- (In reply to Jakub Jelinek from comment #4) > This is a new warning, the fact that we didn't warn on some code and now > warn with a new warning is not necessarily a regression. Well, I wasn't so sure either if

[Bug sanitizer/79265] [7 regression] -fsanitize=undefined inserts unnecessary null pointer tests

2017-04-05 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79265 Franz Sirl changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c/80253] New: Optimization silences __attribute__((fallthrough)) warning

2017-03-29 Thread sirl at gcc dot gnu.org
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 41073 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41073&action=edit testcase The attached testcase issues 2 warnin

[Bug rtl-optimization/78735] profiledbootstrap with --enable-checking=yes,rtl fails on trunk due to -Werror=strict-overflow

2017-03-23 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78735 --- Comment #1 from Franz Sirl --- Can be worked around by bootstrapping with --disable-werror. Last reconfirmed with trunk r246380. Trunk is at 7.0.1, so --disable-werror is the default right now. I guess the only real question is if the profil

[Bug c/79692] [7 Regression] -Wformat-overflow false positive with unknown width

2017-02-27 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79692 --- Comment #3 from Franz Sirl --- I can confirm that the patch fixes both the submitted testcase and the original code. Thanks for your efforts.

[Bug c/79692] New: -Wformat-overflow false positive?

2017-02-23 Thread sirl at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 40820 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40820&action=edit testcase With trunk r245678 on x86_64 the attached testcase prints these warnings: gc

[Bug c/79082] -Wformat-truncation inconsistent behaviour

2017-01-30 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79082 --- Comment #14 from Franz Sirl --- I just finished testing with r245021 and now the warnings are as expected. All warnings are there with -Wformat-truncation=2 and also -Wformat-truncation=1 behaves according to the documentation (BTW, there's a

[Bug c++/79258] New: -Wduplicated-branches false positive?

2017-01-27 Thread sirl at gcc dot gnu.org
++ Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- This code: class Base { public: static bool state(); }; class Derived : public Base { }; class MyClass { public: Derived *m_Derived; Base *m_Base; bool state(); }; bool MyClass

  1   2   >