https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114204
--- Comment #2 from Andrew Pinski ---
```
int f(int a, int b)
{
if (a == -b)
return a + b;
return 0;
}
int f1(int a, int b)
{
if (a == b)
return a - b;
return 0;
}
```
Should be both handled i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114205
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109398
--- Comment #2 from Andrew Pinski ---
So this might not be a clang extension after all. see
https://github.com/llvm/llvm-project/issues/83658 (and DE-137 discussion in the
meeting minutes: https://www.open-std.org/JTC1/sc22/wg14/www/docs/n3167.p
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114206
Bug ID: 114206
Summary: GCC generates wrong-code
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: u
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114206
Andrew Pinski changed:
What|Removed |Added
Component|c |tree-optimization
--- Comment #1 from A
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114207
Bug ID: 114207
Summary: Wrong code bug since GCC 12.1
Product: gcc
Version: 12.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114100
--- Comment #4 from GCC Commits ---
The master branch has been updated by Georg-Johann Lay :
https://gcc.gnu.org/g:96bad6c06d0108014a2b0e5d0921cb18066bb789
commit r14-9271-g96bad6c06d0108014a2b0e5d0921cb18066bb789
Author: Georg-Johann Lay
Dat
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114194
Andrew Pinski changed:
What|Removed |Added
Target||riscv
Keywords|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114206
--- Comment #2 from congli ---
That's correct. But I think it is not that reasonable if we treat the `b` like
`b` is a `static const` variable rather than a `const` variable? Any documents
telling this?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114207
Andrew Pinski changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114206
--- Comment #3 from congli ---
How about this one: https://gcc.godbolt.org/z/Wvhddb7nf?
We ensured the two `b`s are different at each f() call.
single
Supported LTO compression algorithms: zlib
gcc version 14.0.1 20240302 (experimental) (GCC)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114208
--- Comment #1 from Andrew Pinski ---
I wonder if this is related to r14-6674-g4759383245ac97 .
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114206
Xi Ruoyao changed:
What|Removed |Added
Keywords||wrong-code
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114208
--- Comment #2 from Georg-Johann Lay ---
(In reply to Andrew Pinski from comment #1)
> I wonder if this is related to r14-6674-g4759383245ac97 .
Not unlikely. PR112525 tries to eliminate dead stores for arguments that are
passed. It seems like
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114209
Bug ID: 114209
Summary: ICE: verify_gimple failed: incorrect sharing of tree
nodes at -O and above
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: ice
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114208
--- Comment #3 from Georg-Johann Lay ---
(In reply to Andrew Pinski from comment #1)
> I wonder if this is related to r14-6674-g4759383245ac97 .
Seems unrelated: When I reverse-apply r14-6674 then the issue does not go away.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114206
Arsen Arsenović changed:
What|Removed |Added
CC||arsen at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6
--- Comment #13 from g.peterh...@t-online.de ---
Thanks for the suggestions:
template
constexpr _Tp __hypot3(_Tp __x, _Tp __y, _Tp __z) noexcept
{
if (std::isinf(__x) | std::isinf(__y) | std::isinf(__z))
[[__unlikely__]]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114141
--- Comment #14 from Paul Thomas ---
To fix the parentheses wrinkle, this works:
diff --git a/gcc/fortran/match.cc b/gcc/fortran/match.cc
index eee569dac91..64f61c50c66 100644
--- a/gcc/fortran/match.cc
+++ b/gcc/fortran/match.cc
@@ -1963,6 +196
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114210
Bug ID: 114210
Summary: Potential bug wrt __restrict on member function
decl/def
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Prio
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114207
Jakub Jelinek changed:
What|Removed |Added
CC||hubicka at gcc dot gnu.org,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101523
Sarah Julia Kriesch changed:
What|Removed |Added
CC||sarah.kriesch at opensuse dot
org
nux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-9272-20240302122604-gc8d12343a94-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240302 (experimental) (GCC)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841
--- Comment #11 from Viktor Ostashevskyi ---
(In reply to Jonathan Wakely from comment #10)
> This one's much harder to fix:
>
> #include
>
> template
> struct Alloc
> {
> using value_type = T;
>
> Alloc(int) { }
>
> template Alloc(co
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114211
Andrew Pinski changed:
What|Removed |Added
Last reconfirmed||2024-03-02
Target Milestone|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101523
Sam James changed:
What|Removed |Added
CC||sjames at gcc dot gnu.org
--- Comment #8 fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114209
Andrew Pinski changed:
What|Removed |Added
Last reconfirmed||2024-03-02
Ever confirmed|0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114212
Bug ID: 114212
Summary: `MIN / CST` -> `uns >= CST`
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114212
--- Comment #1 from Andrew Pinski ---
Note I noticed this when looking at
https://github.com/llvm/llvm-project/issues/83676 but that is totally unrelated
since that is for mlir rather than LLVM's IR.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #15 from dave.anglin at bell dot net ---
On 2024-03-01 5:42 p.m., redi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
>
> Jonathan Wakely changed:
>
> What|Removed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841
--- Comment #12 from Jonathan Wakely ---
There's no problem with pair, it's basic_string that fails.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114213
Bug ID: 114213
Summary: `MIN, CST> / CST` -> `a >= CST ? 1 : -(a
<= -CST)`
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: missed-optimization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113125
--- Comment #2 from GCC Commits ---
The releases/gcc-13 branch has been updated by Iain Buclaw
:
https://gcc.gnu.org/g:341fa4d2340b21c322082fb5a7cad18a48b9eda7
commit r13-8398-g341fa4d2340b21c322082fb5a7cad18a48b9eda7
Author: Iain Buclaw
Date
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113758
--- Comment #2 from GCC Commits ---
The releases/gcc-13 branch has been updated by Iain Buclaw
:
https://gcc.gnu.org/g:e64fbf38e0b408696a97fbceb131ed1d19cbcd03
commit r13-8399-ge64fbf38e0b408696a97fbceb131ed1d19cbcd03
Author: Iain Buclaw
Date
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113125
--- Comment #3 from GCC Commits ---
The releases/gcc-12 branch has been updated by Iain Buclaw
:
https://gcc.gnu.org/g:f3567889645ce1fed79c13d644313aa2a8ab9318
commit r12-10188-gf3567889645ce1fed79c13d644313aa2a8ab9318
Author: Iain Buclaw
Dat
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113758
--- Comment #3 from GCC Commits ---
The releases/gcc-12 branch has been updated by Iain Buclaw
:
https://gcc.gnu.org/g:e276a94c061861a09dd790d206ec73d90478925e
commit r12-10189-ge276a94c061861a09dd790d206ec73d90478925e
Author: Iain Buclaw
Dat
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113125
--- Comment #4 from GCC Commits ---
The releases/gcc-11 branch has been updated by Iain Buclaw
:
https://gcc.gnu.org/g:3c0c18799eff99221d2eaae3de6fca6da14269dd
commit r11-11263-g3c0c18799eff99221d2eaae3de6fca6da14269dd
Author: Iain Buclaw
Dat
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113758
--- Comment #4 from GCC Commits ---
The releases/gcc-11 branch has been updated by Iain Buclaw
:
https://gcc.gnu.org/g:8ceb48b1f8ebb9957d896082b0b503cf7f81cace
commit r11-11264-g8ceb48b1f8ebb9957d896082b0b503cf7f81cace
Author: Iain Buclaw
Dat
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113758
Iain Buclaw changed:
What|Removed |Added
Resolution|--- |FIXED
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113125
Iain Buclaw changed:
What|Removed |Added
Resolution|--- |FIXED
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114171
--- Comment #7 from GCC Commits ---
The master branch has been updated by Iain Buclaw :
https://gcc.gnu.org/g:623f52775e677bb3d6e9e7ef97196741dd904b1e
commit r14-9277-g623f52775e677bb3d6e9e7ef97196741dd904b1e
Author: Iain Buclaw
Date: Sun M
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114171
--- Comment #8 from GCC Commits ---
The releases/gcc-13 branch has been updated by Iain Buclaw
:
https://gcc.gnu.org/g:cdcbc56c3f5a04e4e7cccdc70a420bc069a0941f
commit r13-8401-gcdcbc56c3f5a04e4e7cccdc70a420bc069a0941f
Author: Iain Buclaw
Date
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114171
--- Comment #9 from GCC Commits ---
The releases/gcc-12 branch has been updated by Iain Buclaw
:
https://gcc.gnu.org/g:ff9d13e0110b46b39cacb431926515cf4be3aa8d
commit r12-10191-gff9d13e0110b46b39cacb431926515cf4be3aa8d
Author: Iain Buclaw
Dat
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114171
--- Comment #10 from GCC Commits ---
The releases/gcc-11 branch has been updated by Iain Buclaw
:
https://gcc.gnu.org/g:3e60064a03a1a6d38ceb5ca4eb7e1f4d30a8aed1
commit r11-11266-g3e60064a03a1a6d38ceb5ca4eb7e1f4d30a8aed1
Author: Iain Buclaw
Da
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114171
Iain Buclaw changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524
Bug 103524 depends on bug 107400, which changed state.
Bug 107400 Summary: [c++ modules] ICE tree check: expected class 'type', have
'declaration' (template_decl) in get_originating_module_decl, at
cp/module.cc:18587
https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107400
Nathaniel Shead changed:
What|Removed |Added
Target Milestone|--- |14.0
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114214
Bug ID: 114214
Summary: `(x&~M)|((x&M)&~(y&M))` -> `x&~(y&M)` is not done
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114215
Bug ID: 114215
Summary: GCC makes wrong decision for inline with -Os or -Oz to
deal with trivial functions
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Sever
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114215
--- Comment #1 from Andrew Pinski ---
Created attachment 57597
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57597&action=edit
Testcase
Please next time attach the testcase rather than just link to godbolt.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114215
Andrew Pinski changed:
What|Removed |Added
Ever confirmed|0 |1
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114215
--- Comment #3 from cqwrteur ---
test_demovector(checkedvector&):
pushq %rbx
movq%rdi, %rbx
pushq $4
popq%rsi
callcheckedvector::operator[](unsigned long)
movq%rbx, %rdi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114215
--- Comment #4 from cqwrteur ---
void test_demovector(checkedvector& vec, __SIZE_TYPE__ x) noexcept
{
for(__SIZE_TYPE__ i = 0; i < x; i++)
vec[i]=5;
}
void test_demovector_forceinline(checkedvector& vec, __SIZE_TYPE__ x) noexcept
{
for(
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114215
--- Comment #5 from Andrew Pinski ---
Still waiting on a full application rather then small benchmark type sources.
The heurstic here is that if you call operator[] multiple times, it might be
better not to inline it for size reasons.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114215
--- Comment #6 from cqwrteur ---
(In reply to Andrew Pinski from comment #5)
> Still waiting on a full application rather then small benchmark type
> sources. The heurstic here is that if you call operator[] multiple times, it
> might be better
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114215
--- Comment #7 from cqwrteur ---
__builtin_trap() is just to crash the program.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114216
Bug ID: 114216
Summary: gnu2x: error: too many arguments to function ‘host_fn’
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Comp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114216
--- Comment #1 from Andrew Pinski ---
>when building gcc with CFLAGS=" -std=gnu2x "
Why are you building with this?
Also basically target.c is still written in C99.
This patch should fix the issue though:
```
diff --git a/libgomp/target.c b/
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114214
Andrew Pinski changed:
What|Removed |Added
Last reconfirmed||2024-03-03
Assignee|unassigne
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114212
--- Comment #2 from Andrew Pinski ---
For mod, it is
`MIN % 64` -> `a >= 64 ? 0 : a`
`(a >= 64 ? 64 : a) % 64` -> `a >= 64 ? (64 % 64) : (a % 64)` -> `a >= 64 ? 0 :
a` as a will be `a < 64` in the false case.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737
--- Comment #5 from GCC Commits ---
The master branch has been updated by Oleg Endo :
https://gcc.gnu.org/g:4ff8ffe7331cf174668cf5c729fd68ff327ab014
commit r14-9278-g4ff8ffe7331cf174668cf5c729fd68ff327ab014
Author: Oleg Endo
Date: Sun Mar 3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737
--- Comment #6 from GCC Commits ---
The releases/gcc-13 branch has been updated by Oleg Endo
:
https://gcc.gnu.org/g:a38b3dfc71d6b5d07477715a3a6df7b73ebaa68d
commit r13-8402-ga38b3dfc71d6b5d07477715a3a6df7b73ebaa68d
Author: Oleg Endo
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737
--- Comment #7 from GCC Commits ---
The releases/gcc-12 branch has been updated by Oleg Endo
:
https://gcc.gnu.org/g:bbae41dc9033d6f0a9f8bc56cc6f80d90286996c
commit r12-10192-gbbae41dc9033d6f0a9f8bc56cc6f80d90286996c
Author: Oleg Endo
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737
--- Comment #8 from GCC Commits ---
The releases/gcc-11 branch has been updated by Oleg Endo
:
https://gcc.gnu.org/g:ec65cb598cc6fa126b458cf716438cc3f2404f3c
commit r11-11267-gec65cb598cc6fa126b458cf716438cc3f2404f3c
Author: Oleg Endo
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737
Oleg Endo changed:
What|Removed |Added
Resolution|--- |FIXED
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111001
Oleg Endo changed:
What|Removed |Added
Resolution|--- |FIXED
Status|NEW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114217
Bug ID: 114217
Summary: -fsanitize=alignment false positive with intended
unaligned struct member access
Product: gcc
Version: 13.2.0
Status: UNCONFIRMED
Sever
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114217
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114217
--- Comment #2 from Andrew Pinski ---
That is if we have:
void f(void)
{
char t[sizeof(int)] __attribute__((aligned(1)));
int *a = (int*)&t;
//
}
The above code is undefined even if you have not accessed via *a at all.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114217
--- Comment #3 from Akihiko Odaki ---
(In reply to Andrew Pinski from comment #1)
> >but also emits code to assert alignment.
>
>
> Yes because the code is broken still.
>
> The alignment is not about when the access happens but rather when t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114217
--- Comment #4 from Andrew Pinski ---
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/asm-generic/unaligned.h?h=v6.7
is correct except it should not expose get_unaligned/put_unaligned since the
undefined code hap
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114217
--- Comment #5 from Akihiko Odaki ---
(In reply to Andrew Pinski from comment #4)
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/
> include/asm-generic/unaligned.h?h=v6.7
>
> is correct except it should not expose get
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114218
Bug ID: 114218
Summary: -Wdr could show constant values
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
As
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114218
--- Comment #1 from Sam James ---
To be clear: what I'd like is if the warning included "MAGIC_NUMBER was 42 at
one instance, and 100 at another".
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114218
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Summary|-Wodr could show
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114217
--- Comment #6 from Akihiko Odaki ---
(In reply to Andrew Pinski from comment #4)
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/
> include/asm-generic/unaligned.h?h=v6.7
>
> is correct except it should not expose get
77 matches
Mail list logo