[Bug c++/62153] warn for bool expression compared with integer different from 0/1

2014-08-19 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62153 --- Comment #8 from Franz Sirl sirl at gcc dot gnu.org --- Hmm, what about the assignment part of the merged bug 44077: _Bool var = 3; Does the fix warn about this? Should I create a new bug report for this part?

[Bug tree-optimization/64034] New: [5 regression] cc1 stack-overflow with -O2 -fsanitize=undefined

2014-11-23 Thread sirl at gcc dot gnu.org
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Created attachment 34080 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34080action=edit testcase to reproduce the bug The attached testcase

[Bug sanitizer/64906] New: -fsanitize=integer-divide-by-zero creates false -Wmaybe-uninitialized warning

2015-02-02 Thread sirl at gcc dot gnu.org
: normal Priority: P3 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

[Bug lto/64860] New: multiple definition of typeinfo in 5.0 (4.9.2 works)

2015-01-29 Thread sirl at gcc dot gnu.org
Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Created attachment 34617 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34617action=edit Simple testcase. Use make to reproduce. While trying to construct a testcase for a 4.8 to 4.9 change

[Bug sanitizer/65769] New: [UBSAN] qt-4.6 and qt-4.7 applications using qobject_cast may crash

2015-04-15 Thread sirl at gcc dot gnu.org
Priority: P3 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

[Bug c/66220] New: -Wmisleading-indentation false/inconsistent warning

2015-05-20 Thread sirl at gcc dot gnu.org
: c Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 35578 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35578action=edit Testcase to reproduce The following indenting style generates a false warning

[Bug c/66397] New: sanitize=undefined triggers extra -Warray-bounds warning

2015-06-03 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 35691 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35691action=edit testcase, warns with gcc-6 -c -O2 -fsanitize=undefined

[Bug c/66397] sanitize=undefined triggers extra -Warray-bounds warning

2015-06-03 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66397 --- Comment #3 from Franz Sirl sirl at gcc dot gnu.org --- Yeah, I feared so :-(. This is a bit unfortunate though, as for our code base we compile with -Werror=array-bounds, now when I add -fsanitize=undefined I need to downgrade the error

[Bug c/66220] -Wmisleading-indentation false/inconsistent warning

2015-05-21 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66220 --- Comment #4 from Franz Sirl sirl at gcc dot gnu.org --- Patch from #c3 works fine for our codebase, I couldn't spot any false positives anymore.

[Bug c/66869] New: [6 regression] -Wunused-function no longer warns for static declarations without definition

2015-07-14 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: --- Up to gcc-5.1.1 r225711 -Wunused-functions warns like that: echo 'static void test(void);' | LANG=C gcc-5 -c

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

2015-12-10 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: --- With trunk gcc r231490, for a simple out of bounds access like int arr[3]; int f(void) { return arr[5]; } -Werror=array-bounds=[12] don't turn

[Bug c/68833] [6 Regression] -Werror=format issues an error now

2015-12-14 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68833 --- Comment #4 from Franz Sirl --- The fix in Comment 3 works fine for me. No testsuite regressions and also the application where I spotted this compiles/warns as expected now.

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

2015-12-15 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68845 --- Comment #3 from Franz Sirl --- Created attachment 37035 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37035=edit Alias -Warray-bounds to Warray-bounds= Tentative patch, no regressions. Please commit if OK, I don't have valid

[Bug c/68833] New: -Werror=format issues an error now

2015-12-10 Thread sirl at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- This little example issues an error now on trunk r231490: # gcc -c -Werror=format -x c -

[Bug lto/69003] Undefined reference with gcc -r incremental linking

2015-12-28 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69003 --- Comment #2 from Franz Sirl --- Only gcc-4.8 works (4.8.3 20140627 [gcc-4_8-branch revision 212064]), gcc-4.9 onwards all show the same behaviour.

[Bug lto/69003] New: Undefined reference with gcc -r incremental linking

2015-12-21 Thread sirl at gcc dot gnu.org
: lto Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Created attachment 37096 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37096=edit Testcase, use 'gmake all'. The attached testcase doesn't link with gcc-6 r231

[Bug c/68412] New: ICE with -Wall -Wextra in fold_binary_loc()

2015-11-18 Thread sirl at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- With x86_64 gcc-6 r230524 (r230119 was still OK) compiling this little fragment with -Wall -Wextra: int testwarn(int *pCnShifted) { int cnShifted = *pCnShifted; _Bool

[Bug c++/69237] [6 Regression] strange -Wmisleading-indentation warning when building Chromium

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

[Bug c++/69237] [6 Regression] strange -Wmisleading-indentation warning when building Chromium

2016-01-12 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69237 --- Comment #4 from Franz Sirl --- For me, yes. Because as a reader knowing nothing about the code and looking for some kind of "bug" in the code, I cannot decide easily if the _intention_ was if (elem) { *elem = (*this)[fCount -

[Bug c++/70847] [6/7 Regression] exponential time in cp_fold for chained virtual function calls

2016-06-03 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70847 --- Comment #9 from Franz Sirl --- (In reply to Jakub Jelinek from comment #7) > Created attachment 38636 [details] > gcc7-pr70847.patch > > Untested fix. Applied to gcc-6-branch r237059, no testsuite regressions. Testcase from comment 6 and

[Bug c++/71393] [6.1 Regression] Compilation hang

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

[Bug c++/70847] [6/7 Regression] exponential time in cp_fold for chained virtual function calls

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

[Bug lto/69003] [4.9/5/6 Regression] Undefined reference with gcc -r incremental linking

2016-01-17 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69003 --- Comment #6 from Franz Sirl --- Yes, this fixes the testcase and also the real application it was derived from here. No testsuite regressions on x86_64 either.

[Bug c/79153] -Wimplicit-fallthrough missed warning

2017-01-23 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79153 --- Comment #6 from Franz Sirl --- I see. If you really close it as WONTFIX, could this small deficiency at least be documented in the manual? I guess the non-warning case happens only when the switch-statement directly (no other statements in

[Bug c/79199] New: ICE with -Wduplicated-branches

2017-01-23 Thread sirl at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- This creduce'd testcase crashes with -Wduplicated-branches (trunk r244773). unsigned int a, b, c, d, e; void fn1(void) { if (0) { if (d > 4294967293) (void) 5; c = d; b

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

2017-01-23 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79082 --- Comment #6 from Franz Sirl --- Created attachment 40566 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40566=edit extended testcase Hmm, looks like there is an off-by-one bug lurking here? To clarify my setup, here are the warnings

[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

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

2017-01-25 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79082 --- Comment #9 from Franz Sirl --- With r244892 and -O2 -Wformat-truncation=2 I nearly get the warnings I expect. What remains is case 3, but this seems to be a small deficiency in VRP. For the term I used ((val < 0) ? -(val % 100) : (val %

[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

[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=edit testcase With trunk r245678 on x86_64 the attached testcase prints these warnings: gcc-trunk -Wfor

[Bug c/79153] New: -Wimplicit-fallthrough missed warning

2017-01-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 believe this testcase modeled after real code should warn when falling through into 'case 4'. int test (int v1, int v2) { switch (v1) { case 3: switch (v2

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

2017-01-19 Thread sirl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79082 --- Comment #4 from Franz Sirl --- Hmm, %hhd is not usable on some of our platforms and also only really helpful with exact %x outputs: snprintf(buffer, 3, "%02hhx", val); What about: snprintf(buffer, 4, "%03hx", val & 0xfff); Here the

[Bug c/79152] New: -Wimplicit-fallthrough false positive triggered by goto statements

2017-01-19 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 strange creduce'd testcase warns with current trunk: typedef struct { char * bs; } xstruct; void test (char ch, long handle

[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/78568] New: Wtype-limits warning regression

2016-11-28 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 40179 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40179=edit testcase The attached testcase produces warnings with gcc-4.4.7 on RHEL6, but somewhere along the

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

2016-12-08 Thread sirl at gcc dot gnu.org
Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Hi, current trunk (tried r243299 and r243376) on x86_64 fails a profiledbootstrap with --enable

[Bug bootstrap/78817] stage2 bootstrap failure in vec.h:1613:5: error: argument 1 null where non-null expected after r243661

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

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

2017-01-13 Thread sirl at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- This small testcase warns differently for -O0/g/1/2/3 with this "gcc -c -Wformat-truncation test.c" extern int snprintf(char *str, __SIZE_TYPE__ size, const char *format,

[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

[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=edit testcase The attached testcase issues 2 warnings with

[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

[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/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:

[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

[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 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

[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++/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 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, similar to -T

[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

[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 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

[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=edit testcase The attached testcase removes conditions in the loop when compiled for powerpc-e

[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

[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 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=edit testcase The attached testcase started to produce a warn

[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/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=edit testc

[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=edit testcase 2

[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 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 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=edit testcase Compiling the attached file with r256939 of trunk issues 2 warnings

[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 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

[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 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
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_sprintf

[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 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/85365] New: -Wrestrict false positives with -fsanitize=undefined

2018-04-12 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 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=edit C++ testcase

[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] 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=edit C testc

[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 th

[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
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.org Target Milestone

[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/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=edit testcase The attached testc

[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 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=edit testcase The attached creduced testcases recently started to warn differently in trunk (9 and earl

[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=edit testcase This code: typedef struct { char cs[256]; } inner_small_struct; type

[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 #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

[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,

[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

[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=edit Testcase demonstrating the problem. Hi, the attached simple testcase aborts when compi

[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 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 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 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

[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 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 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-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-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

[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=edit Patch version with minimum changes against GCC10 This is the minimum version of the patch, it fixes this PR but still

[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

[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

  1   2   >