[Bug c++/117154] Aggregate initialization with protected destructor in Base class: GCC vs Clang difference

2024-10-20 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117154 --- Comment #8 from Carlos Galvez --- Actually in the patch that would address this issue for Clang (https://reviews.llvm.org/D53860), they mentioned 2277: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0968r0.html#2227 With emphasi

[Bug c++/117046] -Wclass-memaccess provides misleading diagnostics on std::memcpy

2024-10-20 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117046 --- Comment #8 from Carlos Galvez --- Sorry, I commented on the wrong bug, could some admin please delete my last comment? Thanks!

[Bug c++/117046] -Wclass-memaccess provides misleading diagnostics on std::memcpy

2024-10-20 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117046 --- Comment #7 from Carlos Galvez --- Actually in the patch that would address this issue for Clang (https://reviews.llvm.org/D53860), they mentioned 2277: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0968r0.html#2227 With emphasi

[Bug c++/117154] Aggregate initialization with protected destructor in Base class: GCC vs Clang difference

2024-10-20 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117154 --- Comment #7 from Carlos Galvez --- Hi! I had another look at this an have some follow-up questions: > it looks like GCC already implements the suggested resolution. This does not seem to be the case? The related bug is https://gcc.gnu.org/b

[Bug c++/117154] Aggregate initialization with protected destructor in Base class: GCC vs Clang difference

2024-10-15 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117154 --- Comment #6 from Carlos Galvez --- Alright reading Richard's comment I now understand he's not implying current behavior is correct, but rather explaining why it happens. I take it then that this is a bug in Clang then. Thanks for the clarifi

[Bug c++/117154] Aggregate initialization with protected destructor in Base class: GCC vs Clang difference

2024-10-15 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117154 --- Comment #3 from Carlos Galvez --- Please note that this ticket is about protected *destructor*. For protected *constructor*, clang has same behavior as GCC. CWG 2244 does not appear to consider this case?

[Bug c++/117154] New: Aggregate initialization with protected destructor in Base class: GCC vs Clang difference

2024-10-15 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117154 Bug ID: 117154 Summary: Aggregate initialization with protected destructor in Base class: GCC vs Clang difference Product: gcc Version: 15.0 Status: UNCONFIRMED

[Bug c++/117046] -Wclass-memaccess provides misleading diagnostics on std::memcpy

2024-10-09 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117046 --- Comment #6 from Carlos Galvez --- Ah, that might explain it. It would be great to document the additional logic to avoid confusion. It may also help the LLVM folks implementing the same warning with consistent behavior to GCC: https://gith

[Bug c++/117046] -Wclass-memaccess provides misleading diagnostics on std::memcpy

2024-10-09 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117046 --- Comment #2 from Carlos Galvez --- I also don't understand why the warning fires at all in this case. Even if we pass &bytes, we are passing an object of type 'std::array' which is trivially-copyable (and even trivial?), so I don't see why it

[Bug c++/117046] New: -Wclass-memaccess provides misleading diagnostics on std::memcpy

2024-10-09 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117046 Bug ID: 117046 Summary: -Wclass-memaccess provides misleading diagnostics on std::memcpy Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal

[Bug c++/95701] undefined enum conversion accepted in constant expression

2024-08-27 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95701 Carlos Galvez changed: What|Removed |Added CC||carlosgalvezp at gmail dot com --- Comme

[Bug c++/106294] GCC accepts the undefined behavior operation in a constant expression

2024-08-27 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106294 Carlos Galvez changed: What|Removed |Added CC||carlosgalvezp at gmail dot com --- Comm

[Bug tree-optimization/111714] Strange behavior when casting std::size_t to bool, UB or compiler bug?

2023-10-06 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111714 --- Comment #3 from Carlos Galvez --- Thanks for the quick response! Unfortunately we are stuck on GCC 9 for reasons so I'll try to shuffle the code around a bit to make it work :)

[Bug c++/111714] New: Strange behavior when casting std::size_t to bool, UB or compiler bug?

2023-10-06 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111714 Bug ID: 111714 Summary: Strange behavior when casting std::size_t to bool, UB or compiler bug? Product: gcc Version: 9.4.0 Status: UNCONFIRMED Severity: normal

[Bug gcov-profile/111100] New: Use extern "C" for __gcov_dump and related functions in gcov.h

2023-08-22 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=00 Bug ID: 00 Summary: Use extern "C" for __gcov_dump and related functions in gcov.h Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal

[Bug gcov-profile/110561] gcov counts closing bracket in a function as executable, lowering coverage statistics

2023-07-18 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110561 --- Comment #5 from Carlos Galvez --- @Andrew Pinski ping in case you missed my last message. If this were a duplicate but, wouldn't it also happen in GCC 7.5.0?

[Bug gcov-profile/110561] gcov counts closing bracket in a function as executable, lowering coverage statistics

2023-07-05 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110561 --- Comment #4 from Carlos Galvez --- To clarify, the .gcov file looks like this (correct) on GCC 7.5.0, which I believe is newer than the duplicated bug mentioned here: -:0:Source:main.cpp -:0:Graph:main.gcno -:

[Bug gcov-profile/110561] gcov counts closing bracket in a function as executable, lowering coverage statistics

2023-07-05 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110561 --- Comment #3 from Carlos Galvez --- I forgot to clarify that this bug is _not_ present on gcc 7.5.0 (from where we are bumping), so I believe it's a regression in that regard. Do you still believe it's a duplicate of the bug mentioned above?

[Bug gcov-profile/110561] New: gcov counts closing bracket in a function as executable, lowering coverage statistics

2023-07-05 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110561 Bug ID: 110561 Summary: gcov counts closing bracket in a function as executable, lowering coverage statistics Product: gcc Version: 14.0 Status: UNCONFIRMED Se

[Bug gcov-profile/110395] New: GCOV stuck in an infinite loop with large std::array

2023-06-24 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110395 Bug ID: 110395 Summary: GCOV stuck in an infinite loop with large std::array Product: gcc Version: 9.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Compo

[Bug libgcc/109712] [13/14 Regression] Segmentation fault in linear_search_fdes

2023-06-07 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 --- Comment #29 from Carlos Galvez --- *my comment about uninitialized "ob.s.b.encoding".

[Bug libgcc/109712] [13/14 Regression] Segmentation fault in linear_search_fdes

2023-06-07 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 --- Comment #28 from Carlos Galvez --- The proposed patch fixes the issue on our side, thank you! I realize my comment about doesn't make sense - I was mixing unions in C (where type punning is fine) and C++ (UB). But then I don't understand wh

[Bug libgcc/109712] Segmentation fault in linear_search_fdes

2023-06-05 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 --- Comment #25 from Carlos Galvez --- Perhaps this is a stupid comment, but isn't "ob.s.b.encoding" uninitialized? /* inside find_fde_tail */ struct object ob; ... ob.pc_begin = NULL; ob.tbase = NULL; ob.dbase = (void *) dbase;

[Bug libgcc/109712] Segmentation fault in linear_search_fdes

2023-06-05 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 --- Comment #22 from Carlos Galvez --- Indeed it's an uninitialized read according to valgrind: ==15475== Use of uninitialised value of size 8 ==15475==at 0x1E81C2E9: base_from_object (unwind-dw2-fde.c:319) ==15475==by 0x1E81C2E9: linea

[Bug libgcc/109712] Segmentation fault in linear_search_fdes

2023-06-05 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 --- Comment #18 from Carlos Galvez --- Thanks for the investigation! To clarify: my last reproducible example does not use gold, instead it uses the default GNU ld version 2.38.

[Bug libgcc/109712] Segmentation fault in linear_search_fdes

2023-06-05 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 --- Comment #15 from Carlos Galvez --- Created attachment 55261 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55261&action=edit Reproducible example nvinfer Attaching (hopefully) reproducible example as a tarball, containing: - download

[Bug libgcc/109712] Segmentation fault in linear_search_fdes

2023-06-03 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 --- Comment #12 from Carlos Galvez --- I just tested latest and greatest trunk (git commit 2415024e0f81f8c09bf08f947c790b43de9d0bbc) and the problem persists. Slightly different line numbers but essentially same backtrace: #0 linear_search_fde

[Bug libgcc/109712] Segmentation fault in linear_search_fdes

2023-06-03 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 --- Comment #10 from Carlos Galvez --- Hi! I've continued to look into this and am having a slightly different but essentially same error with yet another Nvidia library, but this time is with a pure shared library, "libnvinfer.so", which was c

[Bug libgcc/109712] Segmentation fault in linear_search_fdes

2023-05-15 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 --- Comment #8 from Carlos Galvez --- Upon closer inspection, it turns out we were building with GCC 7, but then using libgcc_s.so.1 and libstdc++.so.6 from GCC trunk at runtime (via LD_LIBRARY_PATH). Building with GCC trunk instead solves the s

[Bug libgcc/109712] Segmentation fault in linear_search_fdes

2023-05-13 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 --- Comment #6 from Carlos Galvez --- Hi again! I realized there is still one more problem missing, so I suspect the linker was not the only culprit. It does not segfault, but it gets stuck in an infinite loop, once again when mixing exceptions

[Bug c++/109745] [13 Regression] Incorrect code generated with -O1 when having a constexpr object modifying a mutable member

2023-05-12 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109745 --- Comment #8 from Carlos Galvez --- Thanks a lot for the quick fix!

[Bug c++/109745] Incorrect code generated with -O1 when having a constexpr object modifying a mutable member

2023-05-05 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109745 --- Comment #1 from Carlos Galvez --- In case it wasn't clear: the test passes also on O0 - it only fails when increasing from O1 all the way to O3.

[Bug c++/109745] New: Incorrect code generated with -O1 when having a constexpr object modifying a mutable member

2023-05-05 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109745 Bug ID: 109745 Summary: Incorrect code generated with -O1 when having a constexpr object modifying a mutable member Product: gcc Version: 13.1.0 Status: UNCONFIRMED

[Bug libgcc/109712] Segmentation fault in linear_search_fdes

2023-05-04 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 Carlos Galvez changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug libgcc/109712] Segmentation fault in linear_search_fdes

2023-05-04 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 --- Comment #4 from Carlos Galvez --- > Does libcudart_static.a by chance contain any symbols from the libgcc runtime I'm not sure, do you know how I could check that (I'm pretty n00b on these things :)). What I know is that libcudart.so does n

[Bug c++/109712] New: Segmentation fault in linear_search_fdes

2023-05-03 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109712 Bug ID: 109712 Summary: Segmentation fault in linear_search_fdes Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13 since r13-6788

2023-05-02 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109666 --- Comment #5 from Carlos Galvez --- This commit fixes all the ICEs on our side, thank you!

[Bug c++/109663] False positive? Converting from initializer list would use explicit constructor

2023-04-28 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109663 --- Comment #8 from Carlos Galvez --- > Please don't close bugs as FIXED I did choose INVALID, was that not correct?

[Bug c++/109642] False Positive -Wdangling-reference with std::span-like classes

2023-04-28 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109642 --- Comment #6 from Carlos Galvez --- Sounds great, thanks for the quick response! I believe "-Wall -Wextra" is the "bare minimum" set of warnings for most projects so I'm afraid people might still need to disable it via "-Wno*". Adding some [[

[Bug c++/109669] New: Internal Compiler Error when zero-initializing std::array

2023-04-28 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109669 Bug ID: 109669 Summary: Internal Compiler Error when zero-initializing std::array Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal P

[Bug c++/109663] False positive? Converting from initializer list would use explicit constructor

2023-04-28 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109663 Carlos Galvez changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/109663] False positive? Converting from initializer list would use explicit constructor

2023-04-28 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109663 --- Comment #2 from Carlos Galvez --- I could reduce it to a simpler self-contained example: struct Foo; Foo const& foo_maker(); struct Bar { explicit Bar(Foo const&); }; void baz() { Bar const& b{foo_maker()}; } Godbolt: https://go

[Bug c++/109663] False positive? Converting from initializer list would use explicit constructor

2023-04-28 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109663 --- Comment #1 from Carlos Galvez --- I forgot to write the actual error I'm getting: : In function 'int main()': :11:41: error: converting to 'const MyVector' {aka 'const Eigen::Matrix'} from initializer list would use explicit constructor 'Ei

[Bug c++/109663] New: False positive? Converting from initializer list would use explicit constructor

2023-04-28 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109663 Bug ID: 109663 Summary: False positive? Converting from initializer list would use explicit constructor Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severi

[Bug c++/109642] False Positive -Wdangling-reference with std::span-like classes

2023-04-27 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109642 --- Comment #4 from Carlos Galvez --- While I can do that on my own code, I cannot add that suppression on third-party code, like Eigen (which I also get a lot of false positives in similar code), even if I include the header via -isystem - sinc

[Bug c++/109642] False Positive -Wdangling-reference with std::span-like classes

2023-04-27 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109642 --- Comment #2 from Carlos Galvez --- Is there a way to tag classes to mark them for exclusion? Currently the warning is part of -Wall and leads to many false positives. The warning message also says "possibly" dangling reference. In my opinion

[Bug c++/109642] New: False Positive -Wdangling-reference with std::span-like classes

2023-04-26 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109642 Bug ID: 109642 Summary: False Positive -Wdangling-reference with std::span-like classes Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal

[Bug tree-optimization/107699] [12/13 Regression] False positive -Warray-bounds, non-existent offset reported by GCC

2023-02-16 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107699 --- Comment #11 from Carlos Galvez --- Consider this more realistic example: https://godbolt.org/z/jbbqbe8d9 The compiler has all the information available to ensure that getCount().get() is smaller than 3, as enforced by the class invariant w

[Bug tree-optimization/107699] [12/13 Regression] False positive -Warray-bounds, non-existent offset reported by GCC

2022-11-29 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107699 --- Comment #8 from Carlos Galvez --- I see! In that case may I suggest to split the diagnostic into "Warray-bounds" and "Wmaybe-array-bounds"? That way we could enable the first and disable the second. The way it is today, we need to disable W

[Bug tree-optimization/107699] [12/13 Regression] False positive -Warray-bounds, non-existent offset reported by GCC

2022-11-29 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107699 --- Comment #6 from Carlos Galvez --- A similar case in the real world would be this: NumberSmallerThan3 getCount(); std::sort(data.begin(), data.begin() + static_cast(getCount())); The "NumberSmallerThan3" class holds and checks the invarian

[Bug tree-optimization/107699] [12/13 Regression] False positive -Warray-bounds, non-existent offset reported by GCC

2022-11-29 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107699 --- Comment #5 from Carlos Galvez --- > is not good programming practice. Sure. In the real world, we have asserts for this. However this is a problem when we build for Release mode, in which asserts are disabled and thus this warning pops up.

[Bug tree-optimization/107699] [12/13 Regression] False positive -Warray-bounds, non-existent offset reported by GCC

2022-11-16 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107699 --- Comment #2 from Carlos Galvez --- Looking deeply at the stacktrace, I see that std::sort ends up in this kind of code: if (__last - __first > int(_S_threshold)) { std::__insertion_sort(__first, __first + int(_S_thres

[Bug c++/107699] New: False positive -Warray-bounds, non-existent offset reported by GCC

2022-11-15 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107699 Bug ID: 107699 Summary: False positive -Warray-bounds, non-existent offset reported by GCC Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal

[Bug middle-end/107677] -Warray-bounds: unclear what exactly it's meant to detect

2022-11-15 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107677 --- Comment #5 from Carlos Galvez --- Wow, that was mind blowing, thanks for the clarification! Such thing I'd like to have in the docs, it's very easy to confuse with the other message: note: at offset 48 into object '' of size 48 So one offs

[Bug middle-end/107677] -Warray-bounds: unclear what exactly it's meant to detect

2022-11-15 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107677 --- Comment #3 from Carlos Galvez --- The warning message is also hard to decipher. For example, what does this mean? error: array subscript [-536870912, -1] is outside array bounds What is a 2-dimensional subscript applied on a 1D array?

[Bug middle-end/107677] -Warray-bounds: unclear what exactly it's meant to detect

2022-11-14 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107677 --- Comment #2 from Carlos Galvez --- This is a general question which I hope can be answered without a full report. My particular example gets a warning deep into Eigen-like code so it's not easy to provide a minimal example. My questions are

[Bug c++/107677] New: -Warray-bounds: unclear what exactly it's meant to detect

2022-11-14 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107677 Bug ID: 107677 Summary: -Warray-bounds: unclear what exactly it's meant to detect Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Pri

[Bug c++/107361] Why does -Wclass-memaccess require trivial types, instead of trivially-copyable types?

2022-10-23 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107361 --- Comment #2 from Carlos Galvez --- I understand the motivation and I think the warning makes a lot of sense! However I don't see how it could possibly be dangerous in the provided example. Would it suffice to trigger the warning only when a

[Bug c++/107361] New: Why does -Wclass-memaccess require trivial types, instead of trivially-copyable types?

2022-10-23 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107361 Bug ID: 107361 Summary: Why does -Wclass-memaccess require trivial types, instead of trivially-copyable types? Product: gcc Version: 13.0 Status: UNCONFIRMED S

[Bug c++/107290] New: False positive -Wuninitialized with Eigen

2022-10-17 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107290 Bug ID: 107290 Summary: False positive -Wuninitialized with Eigen Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/106925] [12/13 Regression] ICE in maybe_splice_retval_cleanup at gcc/cp/except.cc:1330 since r12-8066-g4822108e61ab8790

2022-10-13 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106925 --- Comment #8 from Carlos Galvez --- Awesome, thanks a lot for the quick fix!

[Bug tree-optimization/107252] False positive stringop-overflow, warning disappears if I remove unrelated code!

2022-10-13 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107252 --- Comment #2 from Carlos Galvez --- To clarify, even removing things from the second function has an impact on the first function (which is where the warning comes from). Shouldn't both functions be independent?

[Bug c++/107252] New: False positive stringop-overflow, warning disappears if I remove unrelated code!

2022-10-13 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107252 Bug ID: 107252 Summary: False positive stringop-overflow, warning disappears if I remove unrelated code! Product: gcc Version: 13.0 Status: UNCONFIRMED Severit

[Bug tree-optimization/106901] [13 Regression] False positive -Warray-bounds with -O2 or higher?

2022-10-11 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106901 --- Comment #7 from Carlos Galvez --- I understand the reasoning, but the loop _can_ executed in other cases where the function is called with different arguments: bar(vec, 5, 5); // Warray-bounds, loop not executed, no runtime OOB. bar(vec, 5

[Bug tree-optimization/107200] False positive -Wdangling-pointer?

2022-10-10 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107200 Carlos Galvez changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug tree-optimization/107200] False positive -Wdangling-pointer?

2022-10-10 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107200 --- Comment #2 from Carlos Galvez --- Created attachment 53688 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53688&action=edit Preprocessed source Attaching preprocessed source. Had to use a tarball since it exceeds the 1 MB limit. Alter

[Bug c++/107200] New: False positive -Wdangling-pointer?

2022-10-10 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107200 Bug ID: 107200 Summary: False positive -Wdangling-pointer? Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/106925] [12/13 Regression] ICE in maybe_splice_retval_cleanup at gcc/cp/except.cc:1330 since r12-8066-g4822108e61ab8790

2022-10-09 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106925 --- Comment #2 from Carlos Galvez --- Hi, is there any progress on the issue?

[Bug c++/106925] New: internal compiler error: Segmentation fault

2022-09-13 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106925 Bug ID: 106925 Summary: internal compiler error: Segmentation fault Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/106901] False positive -Warray-bounds with -O2 or higher?

2022-09-11 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106901 --- Comment #5 from Carlos Galvez --- I also would like to understand why the warning is not triggered if the first "if (size < expected_size)" is removed. https://godbolt.org/z/7vqPxhsqo The possibility of executing the loop and do out-of-bo

[Bug c++/106901] False positive -Warray-bounds with -O2 or higher?

2022-09-10 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106901 --- Comment #4 from Carlos Galvez --- Makes sense! Would it make sense to classify this as "maybe-array-bounds" instead? Similar to "maybe-uninitialized" vs "uninitialized"

[Bug c++/106901] False positive -Warray-bounds with -O2 or higher?

2022-09-10 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106901 --- Comment #2 from Carlos Galvez --- If size == 5, expected_size == 5, then the loop is not executed, right?

[Bug c++/106901] New: False positive -Warray-bounds with -O2 or higher?

2022-09-10 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106901 Bug ID: 106901 Summary: False positive -Warray-bounds with -O2 or higher? Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component

[Bug c/12245] [10/11/12/13 regression] Uses lots of memory when compiling large initialized arrays

2022-07-05 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12245 Carlos Galvez changed: What|Removed |Added CC||carlosgalvezp at gmail dot com --- Comme

[Bug c++/103862] Regression: -Wold-style-cast warns about system macros

2021-12-29 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103862 --- Comment #3 from Carlos Galvez --- Interesting, thanks for the quick reply! In case it helps, if I include the header as a regular header, I do get the "note" referring to the system header: # g++-11 -I include -Wold-style-cast main.cpp In f

[Bug c++/103862] Regression: -Wold-style-cast warns about system macros

2021-12-29 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103862 --- Comment #1 from Carlos Galvez --- The problem exists also in GCC 9.4.0

[Bug preprocessor/12258] -Wold-style-cast triggers on casts in macros from system headers

2021-12-29 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12258 Carlos Galvez changed: What|Removed |Added CC||carlosgalvezp at gmail dot com --- Comme

[Bug c++/103862] New: Regression: -Wold-style-cast warns about system macros

2021-12-29 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103862 Bug ID: 103862 Summary: Regression: -Wold-style-cast warns about system macros Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 C

[Bug driver/102803] Bug: -no-canonical-prefixes not working

2021-10-29 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102803 Carlos Galvez changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[Bug driver/102803] Bug: -no-canonical-prefixes not working

2021-10-18 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102803 --- Comment #6 from Carlos Galvez --- Hmm I don't see that in the x86 version of Ubuntu GCC: Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-lan

[Bug driver/102803] Bug: -no-canonical-prefixes not working

2021-10-18 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102803 --- Comment #4 from Carlos Galvez --- Thanks a lot for the detailed answer! That's very interesting, so it can actually have to do with how the Ubuntu version has been built. I'll definitely give it a try building locally. Your output looks lik

[Bug driver/102803] Bug: -no-canonical-prefixes not working

2021-10-17 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102803 --- Comment #2 from Carlos Galvez --- Did you read my detailed explanation and reproducible example? I took great care and time to make the problem easy to investigate. GCC is not doing what is supposed to do. Other compilers, like Clang, do act

[Bug driver/102803] New: Bug: -no-canonical-prefixes not working

2021-10-17 Thread carlosgalvezp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102803 Bug ID: 102803 Summary: Bug: -no-canonical-prefixes not working Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: drive