[Bug c/106332] New: Possible out of bound buffer access in opts-common.c

2022-07-17 Thread liftdat at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106332 Bug ID: 106332 Summary: Possible out of bound buffer access in opts-common.c Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Compon

[Bug middle-end/106332] Possible out of bound buffer access in opts-common.c

2022-07-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106332 --- Comment #1 from Andrew Pinski --- The one inside check_offload_target_name (in gcc.cc) will always have at least one entry in candidates. The one inside cmdline_handle_error (in opts-common.cc) could in theory be called with no elements for

[Bug target/106278] [13 Regression] ICE on valid code at -Os and above on x86_64-linux-gnu: in ix86_output_ssemov, at config/i386/i386.cc:5555 since r13-1607-gc3ed9e0d6e96d869

2022-07-17 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106278 Roger Sayle changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug target/106273] [13 Regression] wrong code with -Og -march=cascadelake (due to ANDN?) since r13-1379-ge8a46e5cdab500ea

2022-07-17 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106273 Roger Sayle changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/106332] Possible out of bound buffer access in opts-common.c

2022-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106332 --- Comment #2 from Jonathan Wakely --- I suppose we could just put a gcc_assert in there to make that assumption explicit and give an ICE in checked builds.

[Bug c/106333] New: Required condition omitted from generated code

2022-07-17 Thread eran.kornblau at kaltura dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106333 Bug ID: 106333 Summary: Required condition omitted from generated code Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug middle-end/106332] Possible out of bound buffer access in opts-common.c

2022-07-17 Thread liftdat at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106332 --- Comment #3 from liftdat at protonmail dot com --- (In reply to Andrew Pinski from comment #1) > The one inside check_offload_target_name (in gcc.cc) will always have at > least one entry in candidates. > > The one inside cmdline_handle_error

[Bug preprocessor/97498] #pragma GCC diagnostic ignored "-Wunused-function" inconsistent

2022-07-17 Thread lhyatt at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97498 Lewis Hyatt changed: What|Removed |Added CC||lhyatt at gmail dot com --- Comment #8 fro

[Bug c/106333] Required condition omitted from generated code

2022-07-17 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106333 Andreas Schwab changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/106333] Required condition omitted from generated code

2022-07-17 Thread eran.kornblau at kaltura dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106333 --- Comment #2 from Eran Kornblau --- Thanks Andreas, I understand there's an overflow here, but isn't it a bug that it affects the second part of the condition? I mean, any value is legit for the first part of the condition, if the behavior is

[Bug c++/99377] [modules] undefined std::string_view::empty() if referenced in inline exported function

2022-07-17 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99377 --- Comment #13 from Johel Ernesto Guerrero Peña --- > The workaround of Comment 5 stopped working for my actual use-case some time > ago. The `using` declaration works if I move it earlier in the TU.

[Bug c/106333] Required condition omitted from generated code

2022-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106333 --- Comment #3 from Jonathan Wakely --- (In reply to Eran Kornblau from comment #2) > Thanks Andreas, I understand there's an overflow here, but isn't it a bug > that it affects the second part of the condition? No. > I mean, any value is le

[Bug c/106333] Required condition omitted from generated code

2022-07-17 Thread eran.kornblau at kaltura dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106333 --- Comment #4 from Eran Kornblau --- Ok, thank you both. One last point - maybe it makes sense to at least output a warning in this case? I added '-Wall -pedantic -Wextra' to the command, and didn't get any warning about this. The end result

[Bug lto/106334] New: [13 Regression] lto -g ICE in dwarf2out_register_external_die at dwarf2out.cc:6072

2022-07-17 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106334 Bug ID: 106334 Summary: [13 Regression] lto -g ICE in dwarf2out_register_external_die at dwarf2out.cc:6072 Product: gcc Version: 13.0 Status: UNCONFIRMED Sever

[Bug c/106333] Required condition omitted from generated code

2022-07-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106333 --- Comment #5 from Andrew Pinski --- There was -Wstrict-overflow but many of those warnings are gone in recent versions of the compiler and it was way too noisy. -fsanitize=undefined should be able to detect the problem at runtime instead.

[Bug c/106333] Required condition omitted from generated code

2022-07-17 Thread eran.kornblau at kaltura dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106333 --- Comment #6 from Eran Kornblau --- Indeed! /tmp/x.c:18:44: runtime error: signed integer overflow: 9223372036854775807 - -1 cannot be represented in type 'long long int' Thanks! Eran

[Bug lto/106334] [13 Regression] lto -g ICE in dwarf2out_register_external_die at dwarf2out.cc:6072

2022-07-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106334 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |13.0 Keywords|

[Bug fortran/106331] [12/13 Regression] Whole array assignment of empty string segfaults with -Og

2022-07-17 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106331 anlauf at gcc dot gnu.org changed: What|Removed |Added Summary|Whole array assignment of |[12/13 Regression] Whole

[Bug lto/106328] Build doesn't respect -j N flag

2022-07-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106328 --- Comment #1 from Andrew Pinski --- Hmm: https://gcc.gnu.org/onlinedocs/gcc-10.4.0/gcc/Optimize-Options.html#index-flto Maybe the automation detection of job server is not working on freebsd correctly.

[Bug target/106322] i386: Wrong code at O2 level (O0 / O1 are working)

2022-07-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322 Andrew Pinski changed: What|Removed |Added Target||i386-linux-gnu Component|c++

[Bug middle-end/106323] [Suboptimal] memcmp(s1, s2, n) == 0 expansion on AArch64 compare to llvm

2022-07-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106323 --- Comment #1 from Andrew Pinski --- GCC might be better if the first bytes are in cache but the next bytes are not and then branch is predictable (which it might be). So this is much more complex than just changing this really.

[Bug fortran/103590] ICE: find_array_spec(): Missing spec

2022-07-17 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103590 anlauf at gcc dot gnu.org changed: What|Removed |Added CC||anlauf at gcc dot gnu.org --

[Bug middle-end/106323] [Suboptimal] memcmp(s1, s2, n) == 0 expansion on AArch64 compare to llvm

2022-07-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106323 Andrew Pinski changed: What|Removed |Added Depends on||104611 --- Comment #2 from Andrew Pinsk

[Bug c/106335] New: struct copies with volatile fields are done using memcpy

2022-07-17 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106335 Bug ID: 106335 Summary: struct copies with volatile fields are done using memcpy Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Prio

[Bug c/47409] volatile struct member bug

2022-07-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47409 Andrew Pinski changed: What|Removed |Added CC||segher at gcc dot gnu.org --- Comment #2

[Bug c/106335] struct copies with volatile fields are done using memcpy

2022-07-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106335 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/106303] [13 Regression] ICE on valid code at -O3 with -fno-inline-small-functions on x86_64-linux-gnu: in extract_insn, at recog.cc:2791 since r13-1607-gc3ed9e0d6e96d869

2022-07-17 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
Supported LTO compression algorithms: zlib gcc version 13.0.0 20220717 (experimental) [master r13-1722-g7bcd7f47359] (GCC) [571] % [571] % gcctk -O2 small.c small.c: In function ‘n’: small.c:18:1: error: unrecognizable insn: 18 | } | ^ (insn 41 25 32 8 (set (reg:TI 85 [ D.2008

[Bug fortran/106336] New: BLOCK construct and host association are not handled correctlyThis

2022-07-17 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106336 Bug ID: 106336 Summary: BLOCK construct and host association are not handled correctlyThis Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal

[Bug target/106231] sign-extension of the result of `__builtin_ctz`

2022-07-17 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106231 --- Comment #3 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:2907bfc3412dd8aef6c6acc17f2152a4e0ac4979 commit r13-1726-g2907bfc3412dd8aef6c6acc17f2152a4e0ac4979 Author: Roger Sayle Date: Mon J