[Bug ipa/96059] ICE: in remove_unreachable_nodes, at ipa.c:575 with -fdevirtualize-at-ltrans

2024-05-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96059

Sam James  changed:

   What|Removed |Added

 Blocks|59859   |
   See Also||https://bugs.gentoo.org/sho
   ||w_bug.cgi?id=900146

--- Comment #6 from Sam James  ---
Actually, let me drop the PR59859 blocker, as IIRC we've had reports of this
downstream w/o graphite.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59859
[Bug 59859] [meta-bug] GRAPHITE issues

[Bug rtl-optimization/115056] [14/15 regression] Miscompilation (also triggering -Wstringop-overflow and -Warray-bounds warning) when -O2 or higher

2024-05-12 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115056

Sam James  changed:

   What|Removed |Added

   Last reconfirmed||2024-05-13
 Ever confirmed|0   |1
 Status|UNCONFIRMED |WAITING

[Bug rtl-optimization/115056] [14/15 regression] Miscompilation (also triggering -Wstringop-overflow and -Warray-bounds warning) when -O2 or higher

2024-05-12 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115056

--- Comment #9 from Sam James  ---
The issue is we need a program which no UB which has the bad symptoms.

I can fix it up but that doesn't mean it has the symptoms you originally saw
which made you report a bug.

[Bug rtl-optimization/115056] [14/15 regression] Miscompilation (also triggering -Wstringop-overflow and -Warray-bounds warning) when -O2 or higher

2024-05-12 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115056

--- Comment #7 from Sam James  ---
Isn't there still an uninitialised read?

```
$ valgrind /tmp/foo
[...]
==814922==
1886221359
1
0
0
0
0
0
==814922== Use of uninitialised value of size 8
==814922==at 0x48F7D3A: _itoa_word (_itoa.c:183)
==814922==by 0x49029A6: __printf_buffer (vfprintf-process-arg.c:155)
==814922==by 0x4904BD0: __vfprintf_internal (vfprintf-internal.c:1544)
==814922==by 0x49C55AE: __printf_chk (printf_chk.c:33)
==814922==by 0x10938D: main (/tmp/foo.c:16)
==814922==
```

with:
```
#include 
#include 
typedef union {
unsigned char as_bytes[64];
unsigned long long as_chunks[64 / sizeof(unsigned long long)];
} Block;
int main(int argc, char **argv) {
Block block;
int i = strlen(argv[0]), j = 0;
for (; j < i; j++) block.as_bytes[j] = argv[0][j];
block.as_bytes[j] = 0x01; // I removed this line
while (++j & 7) block.as_bytes[j] = 0;
if (j > 56) while (j < 64) block.as_bytes[j++] = 0;
while (j < 56) block.as_bytes[j++] = 0;
for (j = 0; j < 8; j++) printf("%d\n", (int)block.as_chunks[j]);
}
```

[Bug rtl-optimization/115056] [14 regression] Miscompilation (also triggering -Wstringop-overflow and -Warray-bounds warning) when -O2 or higher

2024-05-12 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115056

--- Comment #6 from Sam James  ---
I was just about to comment that, thanks!

[Bug rtl-optimization/115056] [14 regression] Miscompilation (also triggering -Wstringop-overflow and -Warray-bounds warning) when -O2 or higher

2024-05-12 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115056

--- Comment #4 from Sam James  ---
With Clang, I get:
```
¢ clang /tmp/foo.c -o /tmp/foo
$ /tmp/foo
1886221359
0
0
0
0
0
0
-733536256
```
and
```
$ clang /tmp/foo.c -o /tmp/foo -fsanitize=address,undefined
$ /tmp/foo
1886221359
0
0
0
0
0
0
0
```

[Bug rtl-optimization/115056] [14 regression] Miscompilation (also triggering -Wstringop-overflow and -Warray-bounds warning) when -O2 or higher

2024-05-12 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115056

--- Comment #2 from Sam James  ---
(In reply to Dale Weiler from comment #0)
> I've isolated what appears to be an unsound __builtin_memset optimization
> applied by gcc 14.1.1 on a hash function in a cryptographic library where it
> writes one byte beyond the end of a buffer.

You don't have to share, but I find it useful to know where stuff was reduced
from. Was it a public library? If so, what? It is OK to not answer.

[Bug rtl-optimization/115056] [14 regression] Miscompilation (also triggering -Wstringop-overflow and -Warray-bounds warning) when -O2 or higher

2024-05-12 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115056

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org
   Keywords||wrong-code
Summary|Miscompilation triggering   |[14 regression]
   |-Wstringop-overflow and |Miscompilation (also
   |-Warray-bounds warning when |triggering
   |-O2 or higher   |-Wstringop-overflow and
   ||-Warray-bounds warning)
   ||when -O2 or higher

--- Comment #1 from Sam James  ---
Just to be clear as it might be easy to misread: the warnings are maybe a hint
about what's going on, and not the complaint here.

I can reproduce diff. results w/ 13 vs 14, not looked further yet.

[Bug c++/115050] Segfault when compiled with -O0

2024-05-12 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115050

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org

--- Comment #2 from Sam James  ---
Clang trunk UBSAN says:
```
/app/example.cpp:22:5: runtime error: constructor call on misaligned address
0x7ffe75477cbb for type 'Handler *', which requires 8 byte alignment
0x7ffe75477cbb: note: pointer points here
 00  62 52 4a fe c8 7b 00 00  01 00 00 00 00 00 00 00  67 6c 69 62 00 00 00 00 
01 00 00 00 00 00 00
  ^ 
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:22:5 
/app/example.cpp:22:5: runtime error: constructor call on misaligned address
0x7ffe75477cbb for type 'VTable', which requires 8 byte alignment
0x7ffe75477cbb: note: pointer points here
 00  62 52 4a fe c8 7b 00 00  01 00 00 00 00 00 00 00  67 6c 69 62 00 00 00 00 
01 00 00 00 00 00 00
  ^ 
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:22:5 
/app/example.cpp:8:7: runtime error: constructor call on misaligned address
0x7ffe75477cbb for type 'VTable *', which requires 8 byte alignment
0x7ffe75477cbb: note: pointer points here
 00  62 52 4a fe c8 7b 00 00  01 00 00 00 00 00 00 00  67 6c 69 62 00 00 00 00 
01 00 00 00 00 00 00
  ^ 
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:8:7 
/app/example.cpp:24:27: runtime error: constructor call on misaligned address
0x7ffe75477cc3 for type 'Testor', which requires 8 byte alignment
0x7ffe75477cc3: note: pointer points here
 68  5a 00 00 00 00 00 00 00  67 6c 69 62 00 00 00 00  01 00 00 00 00 00 00 00 
90 9d 42 fe c8 7b 00
  ^ 
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:24:27 
/app/example.cpp:11:13: runtime error: member call on misaligned address
0x7ffe75477cbb for type 'VTable *', which requires 8 byte alignment
0x7ffe75477cbb: note: pointer points here
 00  62 52 4a 60 4c 47 5d 68  5a 00 00 00 00 00 00 00  67 6c 69 62 00 00 00 00 
01 00 00 00 00 00 00
  ^ 
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:11:13 
/app/example.cpp:39:62: runtime error: member call on misaligned address
0x7ffe75477cbb for type 'VTable', which requires 8 byte alignment
0x7ffe75477cbb: note: pointer points here
 00  62 52 4a 60 4c 47 5d 68  5a 00 00 00 00 00 00 00  67 6c 69 62 00 00 00 00 
01 00 00 00 00 00 00
  ^ 
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:39:62 
/app/example.cpp:29:5: runtime error: member call on misaligned address
0x7ffe75477cbb for type 'Handler *', which requires 8 byte alignment
0x7ffe75477cbb: note: pointer points here
 00  62 52 4a 60 4c 47 5d 68  5a 00 00 00 00 00 00 00  67 6c 69 62 00 00 00 00 
01 00 00 00 00 00 00
  ^ 
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:29:5 
 caught! std::bad_exception
```

GCC's reports nothing though.

[Bug bootstrap/54179] please split insn-emit.c !

2024-05-11 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54179

--- Comment #40 from Sam James  ---
That came up at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111600#c29.

[Bug libstdc++/88545] std::find compile to memchr in trivial random access cases (patch)

2024-05-10 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88545

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org

--- Comment #1 from Sam James  ---
I realise this is many years later, but please send patches to the gcc-patches
& libstdc++ mailing lists.

Patches on BZ are just used to store WIPs/drafts.

[Bug tree-optimization/115040] Missed optimization opportunity in std::find of std::vector elements

2024-05-10 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115040

--- Comment #3 from Sam James  ---
(In reply to Andrew Pinski from comment #2)
> > clang lowers both the calls to (w)memchr
> 
> Is that with libc++ or libstdc++?

It's libc++. Checked locally too..

[Bug tree-optimization/115041] Missed optimization opportunity in std::find of std::vector elements

2024-05-10 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115041

Sam James  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 CC||sjames at gcc dot gnu.org
 Status|UNCONFIRMED |RESOLVED

--- Comment #1 from Sam James  ---
Same code in 115040?

*** This bug has been marked as a duplicate of bug 115040 ***

[Bug tree-optimization/115040] New: Missed optimization opportunity in std::find

2024-05-10 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115040

Bug ID: 115040
   Summary: Missed optimization opportunity in std::find
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hiraditya at msn dot com
  Target Milestone: ---

https://gcc.godbolt.org/z/s3hv15935


```
#include 
#include 
#include 

bool find_epi8(const std::vector& v) {
return std::find(v.begin(), v.end(), 42) != v.end();
}

bool find_epi32(const std::vector& v) {
return std::find(v.begin(), v.end(), 42) != v.end();
}
```

$ gcc -O3 -ftree-vectorize -march=pantherlake

```
find_epi8(std::vector > const&):
mov rcx, QWORD PTR [rdi+8]
mov rdx, QWORD PTR [rdi]
mov rsi, rcx
sub rsi, rdx
mov rax, rsi
sar rax, 2
testrax, rax
jle .L2
lea rax, [rdx+rax*4]
jmp .L8
.L3:
cmp BYTE PTR [rdx+1], 42
je  .L23
cmp BYTE PTR [rdx+2], 42
je  .L24
cmp BYTE PTR [rdx+3], 42
je  .L25
add rdx, 4
cmp rdx, rax
je  .L26
.L8:
cmp BYTE PTR [rdx], 42
jne .L3
.L21:
cmp rcx, rdx
setne   al
ret
.L26:
mov rsi, rcx
sub rsi, rdx
.L2:
cmp rsi, 2
je  .L9
cmp rsi, 3
je  .L10
cmp rsi, 1
je  .L11
xor eax, eax
ret
.L10:
cmp BYTE PTR [rdx], 42
je  .L21
add rdx, 1
.L9:
cmp BYTE PTR [rdx], 42
je  .L21
add rdx, 1
.L11:
cmp BYTE PTR [rdx], 42
seteal
cmp rcx, rdx
setne   dl
and eax, edx
ret
.L23:
add rdx, 1
cmp rcx, rdx
setne   al
ret
.L24:
add rdx, 2
cmp rcx, rdx
setne   al
ret
.L25:
add rdx, 3
cmp rcx, rdx
setne   al
ret
find_epi32(std::vector > const&):
mov rcx, QWORD PTR [rdi+8]
mov rdx, QWORD PTR [rdi]
mov rax, rcx
sub rax, rdx
mov rsi, rax
sar rax, 4
sar rsi, 2
testrax, rax
jle .L28
sal rax, 4
add rax, rdx
jmp .L34
.L29:
cmp DWORD PTR [rdx+4], 42
je  .L48
cmp DWORD PTR [rdx+8], 42
je  .L49
cmp DWORD PTR [rdx+12], 42
je  .L50
add rdx, 16
cmp rdx, rax
je  .L51
.L34:
cmp DWORD PTR [rdx], 42
jne .L29
.L47:
cmp rcx, rdx
setne   al
ret
.L51:
mov rsi, rcx
sub rsi, rdx
sar rsi, 2
.L28:
cmp rsi, 2
je  .L35
cmp rsi, 3
je  .L36
cmp rsi, 1
je  .L37
xor eax, eax
ret
.L36:
cmp DWORD PTR [rdx], 42
je  .L47
add rdx, 4
.L35:
cmp DWORD PTR [rdx], 42
je  .L47
add rdx, 4
.L37:
cmp DWORD PTR [rdx], 42
seteal
cmp rcx, rdx
setne   dl
and eax, edx
ret
.L48:
add rdx, 4
cmp rcx, rdx
setne   al
ret
.L49:
add rdx, 8
cmp rcx, rdx
setne   al
ret
.L50:
add rdx, 12
cmp rcx, rdx
setne   al
ret
```


clang lowers both the calls to (w)memchr

--- Comment #1 from Sam James  ---
*** Bug 115041 has been marked as a duplicate of this bug. ***

[Bug target/115010] m68k: invalid subl instruction generated

2024-05-09 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115010

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org

--- Comment #5 from Sam James  ---
(In reply to Thorsten Otto from comment #4)
> Created attachment 58150 [details]
> preprocessed source & assembler output of tree-data-ref.cc

You should be able to reduce this with cvise if you're willing.

[Bug target/112868] GCC passes -many to the assembler for --enable-checking=release builds

2024-05-09 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112868

--- Comment #16 from Sam James  ---
(In reply to Peter Bergner from comment #14)
> (In reply to Niels Möller from comment #13)
> > I'm not that familiar with gcc development procedures. Do I understand you
> > correctly, that a fix for this bug will not be included in gcc-14 (according
> > to https://gcc.gnu.org/develop.html#timeline, gcc-14 stage1 ended several
> > months ago), it will have to wait for gcc-15?
> 
> Correct, I meant waiting for GCC 15 stage1.  I want it to burn-in on trunk
> for a long while, because it had the potential to disrupt distro package
> builds.  It seems clean so far with the practice Gentoo builds, but I'll
> feel more comfortable when other distros start using it too. 

FWIW, we're keeping it going forward (so it'll be in e.g. our GCC 14 patchset
when we unleash that on the masses). Just keep in mind that very few
distributions build with > release checking.

We only do default-checking for the branch when it's in development still and
also optionally via USE=debug. So, while testing by others is still valuable, I
don't expect you'll get that much - at least without people specifically
knowing to turn on checking and ensure stuff doesn't break.

(Of course, making sure release checking works fine now too is important, but
you get my point.)

[Bug middle-end/114989] Compile time hog when building paml

2024-05-08 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114989

--- Comment #3 from Sam James  ---
Created attachment 58131
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58131=edit
codeml.i

codeml.i from the same project is not great either but it's way less
interesting, I think, because it's large. I'll attach it anyway for
completeness.

[Bug c/114989] New: Compile time hog when building paml

2024-05-08 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114989

Bug ID: 114989
   Summary: Compile time hog when building paml
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58130
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58130=edit
baseml.i

Noticed this while working on something unrelated, just felt it looked a bit
sluggish.

The source file is a bit complex, but it's also _not_ huge generated gunk,
which I think makes this a bit more interesting. I don't have older
non-checking compilers around to see if it's a regression, sorry.

```
# time gcc-13 baseml.i -c -O2

real0m3.877s
user0m3.755s
sys 0m0.087s
```

```
# gcc-13 baseml.i -c -O2 -ftime-report

Time variable   usr   sys  wall
  GGC
 phase setup:   0.00 (  0%)   0.00 (  0%)   0.00 (  0%)
 1819k (  1%)
 phase parsing  :   0.09 (  2%)   0.21 ( 34%)   0.31 (  7%)
 9507k (  6%)
 phase opt and generate :   3.59 ( 98%)   0.40 ( 66%)   4.01 ( 93%)
  138M ( 93%)
 dump files :   0.04 (  1%)   0.01 (  2%)   0.05 (  1%)
0  (  0%)
 callgraph construction :   0.00 (  0%)   0.00 (  0%)   0.00 (  0%)
 3240k (  2%)
 callgraph optimization :   0.00 (  0%)   0.00 (  0%)   0.02 (  0%)
 2592  (  0%)
 callgraph functions expansion  :   3.16 ( 86%)   0.32 ( 52%)   3.50 ( 81%)
  111M ( 75%)
 callgraph ipa passes   :   0.39 ( 11%)   0.07 ( 11%)   0.46 ( 11%)
   14M ( 10%)
 ipa function summary   :   0.02 (  1%)   0.00 (  0%)   0.02 (  0%)
 1174k (  1%)
 ipa inlining heuristics:   0.01 (  0%)   0.00 (  0%)   0.00 (  0%)
   54k (  0%)
 ipa pure const :   0.01 (  0%)   0.00 (  0%)   0.01 (  0%)
   72k (  0%)
 ipa free inline summary:   0.01 (  0%)   0.00 (  0%)   0.00 (  0%)
0  (  0%)
 cfg construction   :   0.00 (  0%)   0.00 (  0%)   0.01 (  0%)
  580k (  0%)
 cfg cleanup:   0.08 (  2%)   0.00 (  0%)   0.08 (  2%)
  703k (  0%)
 trivially dead code:   0.02 (  1%)   0.00 (  0%)   0.02 (  0%)
0  (  0%)
 df reaching defs   :   0.03 (  1%)   0.02 (  3%)   0.03 (  1%)
0  (  0%)
 df live regs   :   0.13 (  4%)   0.01 (  2%)   0.14 (  3%)
0  (  0%)
 df live regs   :   0.02 (  1%)   0.01 (  2%)   0.06 (  1%)
0  (  0%)
 df use-def / def-use chains:   0.04 (  1%)   0.00 (  0%)   0.01 (  0%)
0  (  0%)
 df reg dead/unused notes   :   0.08 (  2%)   0.00 (  0%)   0.05 (  1%)
 1648k (  1%)
 register information   :   0.03 (  1%)   0.00 (  0%)   0.00 (  0%)
0  (  0%)
 alias analysis :   0.02 (  1%)   0.01 (  2%)   0.05 (  1%)
 4296k (  3%)
 alias stmt walking :   0.10 (  3%)   0.00 (  0%)   0.15 (  3%)
  658k (  0%)
 register scan  :   0.00 (  0%)   0.00 (  0%)   0.01 (  0%)
   24k (  0%)
 rebuild jump labels:   0.02 (  1%)   0.00 (  0%)   0.00 (  0%)
0  (  0%)
 preprocessing  :   0.02 (  1%)   0.06 ( 10%)   0.11 (  3%)
  331k (  0%)
 lexical analysis   :   0.03 (  1%)   0.08 ( 13%)   0.13 (  3%)
0  (  0%)
 parser (global):   0.01 (  0%)   0.01 (  2%)   0.03 (  1%)
 2449k (  2%)
 parser function body   :   0.03 (  1%)   0.06 ( 10%)   0.04 (  1%)
 6620k (  4%)
 early inlining heuristics  :   0.00 (  0%)   0.00 (  0%)   0.01 (  0%)
   41k (  0%)
 inline parameters  :   0.02 (  1%)   0.00 (  0%)   0.01 (  0%)
  328k (  0%)
 tree gimplify  :   0.02 (  1%)   0.00 (  0%)   0.02 (  0%)
 7063k (  5%)
 tree eh:   0.01 (  0%)   0.00 (  0%)   0.00 (  0%)
   29k (  0%)
 tree CFG construction  :   0.01 (  0%)   0.01 (  2%)   0.02 (  0%)
 2159k (  1%)
 tree CFG cleanup   :   0.03 (  1%)   0.00 (  0%)   0.04 (  1%)
   97k (  0%)
 tree tail merge:   0.00 (  0%)   0.00 (  0%)   0.01 (  0%)
  980k (  1%)
 tree VRP   :   0.15 (  4%)   0.00 (  0%)   0.17 (  4%)
 4202k (  3%)
 tree Early VRP :   0.09 (  2%)   0.01 (  2%)   0.11 (  3%)
 1768k (  1%)
 tree copy propagation  :   0.03 (  1%)   0.00 (  0%)   0.01 (  0%)
  108k (  0%)
 tree PTA   :   0.13 (  4%)   0.01 (  2%)   0.04 (  1%)
  665k (  0%)
 tree SSA rewrite   :   0.01 (  0%)   0.00 (  0%)   0.01 (  0%)
 2202k (  1%)
 tree SSA incremental   :   0.02 (  1%)   0.01 (  2%)   0.00 (  0%)
  745k (  0%)
 tree operand scan 

[Bug fortran/114978] [14/14 regression] 548.exchange2_r 14%-28% regressions on Loongarch64 after gcc 14 snapshot 20240317

2024-05-07 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114978

Sam James  changed:

   What|Removed |Added

 CC||xry111 at gcc dot gnu.org
Summary|548.exchange2_r 14%-28% |[14/14 regression]
   |regressions on Loongarch64  |548.exchange2_r 14%-28%
   |after gcc 14 snapshot   |regressions on Loongarch64
   |20240317|after gcc 14 snapshot
   ||20240317

--- Comment #1 from Sam James  ---
Neither of the two loong maintainers seem to have accounts on BZ (?) so CCIng
xry111. Apologies if I missed their accounts.

[Bug c/114971] gcc-14.1.0, ICE in get_alias_set, at alias.cc:954

2024-05-07 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114971

Sam James  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|UNCONFIRMED |RESOLVED

--- Comment #8 from Sam James  ---
Thanks. It will be.

*** This bug has been marked as a duplicate of bug 114931 ***

[Bug c/114931] [14 regression] ICE in get_alias_set when building tcl with -std=c23

2024-05-07 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114931

--- Comment #20 from Sam James  ---
*** Bug 114971 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/114952] False positive -Wmaybe-uninitialized starting at -O3 in libbpf

2024-05-07 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114952

Sam James  changed:

   What|Removed |Added

 CC||jemarch at gcc dot gnu.org

--- Comment #2 from Sam James  ---
We hit this when poking at wiring up BPF support properly in Gentoo. It's a
pain because both default to building with -Werror=maybe-uninitialized.

[Bug c/114971] gcc-14.1.0, ICE in get_alias_set, at alias.cc:954

2024-05-07 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114971

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org

--- Comment #6 from Sam James  ---
(In reply to Ozkan Sezer from comment #5)
> (In reply to Richard Biener from comment #2)
> > likely a duplicate of PR114931
> 
> I guess -std=gnu23 is the key, then yes, likely a dup.
> 
> Waiting for a resolution.

Please check if trunk works, as a fix for that PR was committed not long ago.

[Bug tree-optimization/114965] [13/14/15 Regression] wrong code generated for Emacs/Gnulib strftime (regression from 13.2)

2024-05-07 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114965

Sam James  changed:

   What|Removed |Added

 CC||amacleod at redhat dot com

--- Comment #8 from Sam James  ---
For Paul's on 13 vs 14, I get r14-3414-g0cfc9c953d0221.

[Bug tree-optimization/114965] [13/14/15 Regression] wrong code generated for Emacs/Gnulib strftime (regression from 13.2)

2024-05-06 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114965

Sam James  changed:

   What|Removed |Added

 CC||aldyh at gcc dot gnu.org

--- Comment #7 from Sam James  ---
(In reply to Andrew Pinski from comment #6)
> Reduded testcase that fails at -O1 (but passes at -O2):
> ```
> 
> [[gnu::noipa]]
> static void g(char pad1) {
> if (pad1 != '0' && pad1 != '+' && pad1 != '_')
>   __builtin_unreachable();
> if (pad1 == '0' || pad1 == '+')
> __builtin_trap();
> }
> char buf[4000];
> int main(void) { g('_'); }
> 
> ```
> 

Bisect for this testcase with releases/gcc-12 vs releases/gcc-13 gives
r13-2876-g2460f7cdef7ef9.

I will do the trunk one from Paul next.

[Bug tree-optimization/114948] [15 Regression] ICE on valid code at -O3 with "-fno-tree-ccp -fno-tree-ch" on x86_64-linux-gnu: in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:647

2024-05-06 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114948

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org
Summary|[14/15 Regression] ICE on   |[15 Regression] ICE on
   |valid code at -O3 with  |valid code at -O3 with
   |"-fno-tree-ccp  |"-fno-tree-ccp
   |-fno-tree-ch" on|-fno-tree-ch" on
   |x86_64-linux-gnu: in|x86_64-linux-gnu: in
   |check_loop_closed_ssa_def,  |check_loop_closed_ssa_def,
   |at  |at
   |tree-ssa-loop-manip.cc:647  |tree-ssa-loop-manip.cc:647

--- Comment #3 from Sam James  ---
Nor me, just trunk..

[Bug sanitizer/114956] [11/12/13/14/15 regression] Segmentation fault with -fsanitize=address -fsanitize=null -O2 when attribute no_sanitize_address is enabled

2024-05-06 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114956

Sam James  changed:

   What|Removed |Added

Summary|Segmentation fault with |[11/12/13/14/15 regression]
   |-fsanitize=address  |Segmentation fault with
   |-fsanitize=null -O2 when|-fsanitize=address
   |attribute   |-fsanitize=null -O2 when
   |no_sanitize_address is  |attribute
   |enabled |no_sanitize_address is
   ||enabled

--- Comment #1 from Sam James  ---
testing on godbolt gives..


gcc 8.2:
```
:2:37: warning: always_inline function might not be inlinable
[-Wattributes]
 __attribute__((always_inline)) int *c() {
 ^
: In function 'd':
:2:37: error: inlining failed in call to always_inline 'c': function
attribute mismatch
:6:61: note: called from here
 __attribute__((no_sanitize_address)) static char d() { *a = c(); }
 ^~~
Compiler returned: 1
```

gcc 8.3:
```
:2:37: warning: always_inline function might not be inlinable
[-Wattributes]
 __attribute__((always_inline)) int *c() {
 ^
during GIMPLE pass: sanopt
: In function 'd':
:6:50: internal compiler error: Segmentation fault
 __attribute__((no_sanitize_address)) static char d() { *a = c(); }
  ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
Compiler returned: 1
```

so a regression in that we ICE.

[Bug c/114931] ICE in get_alias_set when building tcl with -std=c23

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114931

--- Comment #4 from Sam James  ---
```
struct Tcl_Obj;
void(Tcl_FreeInternalRepProc)(struct Tcl_Obj *);
typedef struct Tcl_Obj {
} Tcl_Obj;
struct {
  void (*tclFreeObj)(Tcl_Obj *);
} Tcl_InitStubs;
```

[Bug ipa/114930] [14/15 regression] ICE in fld_incomplete_type_of when building libwebp with -std=c23 -flto

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114930

Sam James  changed:

   What|Removed |Added

Summary|ICE in  |[14/15 regression] ICE in
   |fld_incomplete_type_of when |fld_incomplete_type_of when
   |building libwebp with   |building libwebp with
   |-std=c23 -flto  |-std=c23 -flto

--- Comment #3 from Sam James  ---
c2x in GCC 13 was fine

[Bug rtl-optimization/114931] ICE in get_alias_set when building tcl with -std=c23

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114931

--- Comment #1 from Sam James  ---
With -Wuninitialized, it dies in an earlier pass:
```
# gcc -c tclStubLib.i -std=c23 -Wuninitialized
during GIMPLE pass: early_uninit
/var/tmp/portage/dev-lang/tcl-8.6.14/work/tcl8.6.14/generic/tclStubLib.c: In
function ‘Tcl_InitStubs’:
/var/tmp/portage/dev-lang/tcl-8.6.14/work/tcl8.6.14/generic/tclStubLib.c:119:1:
internal compiler error: in get_alias_set, at alias.cc:954
  119 | }
  | ^
[...]
```

[Bug rtl-optimization/114931] New: ICE in get_alias_set when building tcl with -std=c23

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114931

Bug ID: 114931
   Summary: ICE in get_alias_set when building tcl with -std=c23
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58094
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58094=edit
tclStubLib.i.xz

```
# gcc -c tclStubLib.i -std=c23
during RTL pass: expand
/var/tmp/portage/dev-lang/tcl-8.6.14/work/tcl8.6.14/generic/tclStubLib.c: In
function ‘Tcl_InitStubs’:
/var/tmp/portage/dev-lang/tcl-8.6.14/work/tcl8.6.14/generic/tclStubLib.c:70:31:
internal compiler error: in get_alias_set, at alias.cc:954
   70 | if (!stubsPtr || (stubsPtr->magic != TCL_STUB_MAGIC)) {
  |   ^~~
0x55a6e9af0586 get_alias_set(tree_node*)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/alias.cc:954
0x55a6eb2865eb record_component_aliases(tree_node*, int)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/alias.cc:1306
0x55a6eb26bcdc record_component_aliases(tree_node*)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/alias.cc:1346
0x55a6eb26bcdc get_alias_set(tree_node*)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/alias.cc:1151
0x55a6eb28ee06 set_mem_attributes_minus_bitpos(rtx_def*, tree_node*, int,
poly_int<1u, long>)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/emit-rtl.cc:1976
0x55a6eb63832b set_mem_attributes(rtx_def*, tree_node*, int)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/emit-rtl.cc:2181
0x55a6eb63832b expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/expr.cc:11731
0x55a6eb638c29 expand_expr_real(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/expr.cc:9443
0x55a6eb638c29 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/expr.cc:11949
0x55a6eb63ba80 expand_expr_real(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/expr.cc:9443
0x55a6eb63ba80 store_expr(tree_node*, rtx_def*, int, bool, bool)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/expr.cc:6743
0x55a6eb6368a2 expand_assignment(tree_node*, tree_node*, bool)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/expr.cc:6464
0x55a6eb631a1c expand_gimple_stmt
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/cfgexpand.cc:4077
0x55a6eb631a1c expand_gimple_basic_block
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/cfgexpand.cc:6133
0x55a6eb5daf76 execute
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/cfgexpand.cc:6872
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

[Bug ipa/114930] ICE in fld_incomplete_type_of when building libwebp with -std=c23 -flto

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114930

--- Comment #1 from Sam James  ---
reduced:
```
typedef struct WebPPicture WebPPicture;
typedef int (*WebPProgressHook)(const WebPPicture *);
WebPProgressHook progress_hook;
struct WebPPicture {
} WebPGetColorPalette(const struct WebPPicture *);
```

[Bug ipa/114930] New: ICE in fld_incomplete_type_of when building libwebp with -std=c23 -flto

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114930

Bug ID: 114930
   Summary: ICE in fld_incomplete_type_of when building libwebp
with -std=c23 -flto
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58093
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58093=edit
libwebpdecode_la-vp8l_dec.i.xz

```
$ gcc -c libwebpdecode_la-vp8l_dec.i -std=c23 -flto
/var/tmp/portage/media-libs/libwebp-1.3.2/work/libwebp-1.3.2/src/dec/vp8l_dec.c:
In function ‘CopySmallPattern8b’:
/var/tmp/portage/media-libs/libwebp-1.3.2/work/libwebp-1.3.2/src/dec/vp8l_dec.c:908:10:
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  908 |   while ((uintptr_t)dst & 3) {
  |  ^
/var/tmp/portage/media-libs/libwebp-1.3.2/work/libwebp-1.3.2/src/dec/vp8l_dec.c:
In function ‘CopySmallPattern32b’:
/var/tmp/portage/media-libs/libwebp-1.3.2/work/libwebp-1.3.2/src/dec/vp8l_dec.c:977:7:
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  977 |   if ((uintptr_t)dst & 4) {   // Align 'dst' to 8-bytes
boundary.
  |   ^
/var/tmp/portage/media-libs/libwebp-1.3.2/work/libwebp-1.3.2/src/dec/vp8l_dec.c:
In function ‘CopyBlock32b’:
/var/tmp/portage/media-libs/libwebp-1.3.2/work/libwebp-1.3.2/src/dec/vp8l_dec.c:994:36:
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  994 |   if (dist <= 2 && length >= 4 && ((uintptr_t)dst & 3) == 0) {
  |^
during IPA pass: *free_lang_data
/var/tmp/portage/media-libs/libwebp-1.3.2/work/libwebp-1.3.2/src/dec/vp8l_dec.c:
At top level:
/var/tmp/portage/media-libs/libwebp-1.3.2/work/libwebp-1.3.2/src/dec/vp8l_dec.c:1744:1:
internal compiler error: in fld_incomplete_type_of, at
ipa-free-lang-data.cc:257
 1744 | }
  | ^
0x5564762f6448 fld_incomplete_type_of
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:257
0x5564778ff8fd fld_simplified_type
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:344
0x5564778ff8fd free_lang_data_in_type
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:439
0x556477fd53b0 free_lang_data_in_cgraph
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1072
0x556477fd53b0 free_lang_data
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1109
0x556477fd53b0 execute
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1176
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

[Bug c/114927] ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114927

Sam James  changed:

   What|Removed |Added

 CC||uecker at gcc dot gnu.org

--- Comment #1 from Sam James  ---
Reduced:
```
typedef int pid_t;
struct Lisp_Process;
int gnutls_try_handshake(struct Lisp_Process *);
struct Lisp_Process {
} Sprocess_send_string;
pid_t emacs_get_tty_pgrp(struct Lisp_Process *);
```

[Bug c/114927] New: ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114927

Bug ID: 114927
   Summary: ICE when building Emacs with -std=c23 -flto (error:
‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-checking
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58090
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58090=edit
process.i.xz

Hit this when building Emacs with -std=c23 (which bleeding-edge autoconf now
defaults to).

(Calling this an FE issue for now unless proven otherwise, given richi's
comments on my other bug wrt where the checking is done.)

```
$ gcc -c ./process.i -std=c23 -flto
process.c:8920:1: error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’
 8920 | }
  | ^
 
unit-size 
align:32 warn_if_not_align:0 symtab:0 alias-set 11 canonical-type
0x7f39a98235e8 precision:32 min  max

pointer_to_this >
QI
size  constant 8>
unit-size  constant 1>
align:8 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
arg-types 
unsigned DI
size 
unit-size 
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f39a9852d20>
chain >>
pointer_to_this >
 
unit-size 
align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f39a98235e8 precision:32 min  max

pointer_to_this >
QI
size  constant 8>
unit-size  constant 1>
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f39a8324d20
arg-types 
unsigned DI
size 
unit-size 
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f39a9852d20>
chain >>
pointer_to_this >
during IPA pass: *free_lang_data
process.c:8920:1: internal compiler error: ‘verify_type’ failed
0x55d8b1cdf912 verify_type(tree_node const*)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/tree.cc:14395
0x55d8b3c5b46b free_lang_data
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1134
0x55d8b3c5b46b execute
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1176
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

[Bug lto/114919] ICE when building ecl with LTO

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114919

Sam James  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Sam James  ---
Reduced:
```
typedef struct cl_lispunion *cl_object;
struct cl_lispunion {};
cl_object cl_error() __attribute__((noreturn));
static void L250safe_canonical_type(cl_object volatile) { cl_error(); }
volatile cl_object _eclqGeUMgTYTtUr9_moBRo471_env0;
```

so a dupe

*** This bug has been marked as a duplicate of bug 114918 ***

[Bug lto/114918] ICE when building gcl with LTO

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114918

--- Comment #4 from Sam James  ---
*** Bug 114919 has been marked as a duplicate of this bug. ***

[Bug lto/114919] ICE when building ecl with LTO

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114919

--- Comment #1 from Sam James  ---
reducing

[Bug lto/114919] New: ICE when building ecl with LTO

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114919

Bug ID: 114919
   Summary: ICE when building ecl with LTO
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-checking
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58083
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58083=edit
predlib.i.xz

This might be a dupe of PR114918 but figured I'd keep it separate in case it
isn't.

```
$ gcc -c predlib.i -flto
lsp/predlib.c:5255:1: error: type variant has different ‘TREE_TYPE’
 >
unsigned DI
size 
unit-size 
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f674fc9d8
pointer_to_this >
QI
size  constant 8>
unit-size  constant 1>
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f67500498
pointer_to_this >
lsp/predlib.c:5255:1: error: type variant’s ‘TREE_TYPE’
 >
unsigned DI
size  constant 64>
unit-size  constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f674fc9d8
pointer_to_this >
lsp/predlib.c:5255:1: error: type’s ‘TREE_TYPE’
 >
unsigned DI
size  constant 64>
unit-size  constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f674fc9d8
pointer_to_this >
 >
unsigned DI
size 
unit-size 
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f674fc9d8
pointer_to_this >
QI
size  constant 8>
unit-size  constant 1>
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f67500498
pointer_to_this >
during IPA pass: *free_lang_data
lsp/predlib.c:5255:1: internal compiler error: ‘verify_type’ failed
0x55a3d2d8f912 verify_type(tree_node const*)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/tree.cc:14395
0x55a3d4d0b46b free_lang_data
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1134
0x55a3d4d0b46b execute
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1176
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

[Bug lto/114918] ICE when building gcl with LTO

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114918

--- Comment #3 from Sam James  ---
Reduced (!):
```
typedef struct lispunion *object;
struct lispunion {};
object Icall_gen_error_handler_noreturn() __attribute__((noreturn));
volatile object sLblock;
void(Fblock)(volatile object) { Icall_gen_error_handler_noreturn(); }
```

[Bug libfortran/114895] Build failure with !HAVE_WORKING_STAT

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114895

--- Comment #10 from Sam James  ---
Ah, sorry, you meant GCC sources, not configure test source. ack

[Bug lto/114918] ICE when building gcl with LTO

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114918

--- Comment #2 from Sam James  ---
oops:
> We also had a rep

We had another report of this, curiously again lisp, for ecl with
https://bugs.gentoo.org/931081. I haven't investigated that at all though.
Maybe it's a bundled copy of gcl in there or something.

[Bug lto/114918] ICE when building gcl with LTO

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114918

--- Comment #1 from Sam James  ---
Created attachment 58082
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58082=edit
block.i.xz

[Bug lto/114918] New: ICE when building gcl with LTO

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114918

Bug ID: 114918
   Summary: ICE when building gcl with LTO
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-checking
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Originally reported downstream in Gentoo at https://bugs.gentoo.org/931082 by
Agostino Sarubbo. We also had a rep

```
$ gcc -c ./block.i -flto
block.c:123:1: error: type variant has different ‘TREE_TYPE’
  123 | }
  | ^
 >
unsigned DI
size 
unit-size 
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f1051e3b5e8
pointer_to_this >
QI
size  constant 8>
unit-size  constant 1>
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f1051642e70
arg-types 
chain 
chain 
chain 
chain >
pointer_to_this >
block.c:123:1: error: type variant’s ‘TREE_TYPE’
 >
unsigned DI
size  constant 64>
unit-size  constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f1051e3b5e8
pointer_to_this >
block.c:123:1: error: type’s ‘TREE_TYPE’
 >
unsigned DI
size  constant 64>
unit-size  constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f1051e3b5e8>
 >
unsigned DI
size 
unit-size 
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f1051e3b5e8>
volatile QI
size  constant 8>
unit-size  constant 1>
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f1051363b28
arg-types 
unsigned DI size  unit-size

align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f1051e3b5e8
pointer_to_this >
chain 
chain 
chain 
chain >
pointer_to_this >
during IPA pass: *free_lang_data
block.c:123:1: internal compiler error: ‘verify_type’ failed
0x55c100d66912 verify_type(tree_node const*)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/tree.cc:14395
0x55c102ce246b free_lang_data
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1134
0x55c102ce246b execute
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1176
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

[Bug libfortran/114895] Build failure with !HAVE_WORKING_STAT

2024-05-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114895

--- Comment #8 from Sam James  ---
(In reply to Richard Biener from comment #7)
> So besides maybe no way to reproduce the failure the source still has the
> issue
> described.

Sorry, not following -- jakub's attached one has #define _FILE_OFFSET_BITS 64,
so we should be fine?

[Bug tree-optimization/114872] [13/14/15 Regression] Miscompilation with -O2 after commit r13-8037

2024-04-30 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114872

--- Comment #11 from Sam James  ---
also, do asan and ubsan give anything?

[Bug tree-optimization/114872] [13/14/15 Regression] Miscompilation with -O2 after commit r13-8037

2024-04-30 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114872

--- Comment #10 from Sam James  ---
also maybe obvious, but if you can find something from the cython testsuite, or
at least some other heavy use of cython, which fails, that may be a good
direction.

[Bug tree-optimization/114872] [13/14/15 Regression] Miscompilation with -O2 after commit r13-8037

2024-04-30 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114872

--- Comment #9 from Sam James  ---
unfortunately*

[Bug tree-optimization/114872] [13/14/15 Regression] Miscompilation with -O2 after commit r13-8037

2024-04-30 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114872

--- Comment #8 from Sam James  ---
element.i is unfortunatley huge. It's hard to analyse things without a
standalone testcase, but it's even harder without _something_ one can run.

I'd suggest:
1) giving instructions to reproduce the crash assuming someone knows nothing
about sage and cython;
2) taking sage and cannibalising it (first to directly call
`libgap.AbelianGroup(0,0,0)`, then you can cut things down with lots of
removals + gdb so that the important caller of Py_XDECREF gets passed with the
same args; it's harder if there's a lot of state involved though, of course)
3) build element.i with -fdump-tree-all -fdump-unnumbered -fdump-noaddr (can
also try e.g. -da, see
https://gcc.gnu.org/onlinedocs/gcc/Developer-Options.html) at the bad commit
and before, and diff the produced dumps, and show us the *first* dump which
differs between the two

[Bug tree-optimization/114872] [13/14/15 Regression] Miscompilation with -O2 after commit r13-8037

2024-04-29 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114872

--- Comment #5 from Sam James  ---
Some ideas:
* Could you maybe give a reproducer for the runtime crash?
* Any chance you'd be willing to try bisect element.i with pragmas to
disable/enable optimisation for chunks of it, to find the miscompiled function?

[Bug ipa/114790] [11/12/13/14 regression] ICE when building intel-compute-runtime (error: direct call to ... speculative call sequence has no speculative flag)

2024-04-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114790

--- Comment #13 from Sam James  ---
Created attachment 58018
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58018=edit
tracing_copy_imp.cpp.ii-reduced

Attached another attempt...

[Bug ipa/114790] [11/12/13/14 regression] ICE when building intel-compute-runtime (error: direct call to ... speculative call sequence has no speculative flag)

2024-04-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114790

--- Comment #12 from Sam James  ---
Created attachment 58017
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58017=edit
tracing_imp.cpp.ii-reduced

[Bug ipa/114790] [11/12/13/14 regression] ICE when building intel-compute-runtime (error: direct call to ... speculative call sequence has no speculative flag)

2024-04-21 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114790

Sam James  changed:

   What|Removed |Added

Summary|ICE when building   |[11/12/13/14 regression]
   |intel-compute-runtime   |ICE when building
   |(error: direct call to ...  |intel-compute-runtime
   |speculative call sequence   |(error: direct call to ...
   |has no speculative flag)|speculative call sequence
   ||has no speculative flag)

--- Comment #11 from Sam James  ---
10 wfm (doesn't ICE) on my testcase, 11+ doesn't

[Bug ipa/114790] ICE when building intel-compute-runtime (error: direct call to ... speculative call sequence has no speculative flag)

2024-04-21 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114790

--- Comment #7 from Sam James  ---
`g++-14 -fPIC -O2 -flto -flto-partition=1to1 -shared
-Wl,--version-script=ze.exports reduced-a.ii reduced-b.ii`

it violates ODR though:
```
/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/ccvUhonb.o (symbol from plugin): in function `std::aa':
(.text+0x0): multiple definition of `L0::pGlobalAPITracerContextImp';
/tmp/cci2r56P.o (symbol from plugin):(.text+0x0): first defined here
```

[Bug ipa/114790] ICE when building intel-compute-runtime (error: direct call to ... speculative call sequence has no speculative flag)

2024-04-21 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114790

--- Comment #6 from Sam James  ---
Created attachment 58001
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58001=edit
reduced-b.ii

[Bug ipa/114790] ICE when building intel-compute-runtime (error: direct call to ... speculative call sequence has no speculative flag)

2024-04-21 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114790

--- Comment #5 from Sam James  ---
Created attachment 58000
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58000=edit
reduced-a.b

[Bug ipa/114790] ICE when building intel-compute-runtime (error: direct call to ... speculative call sequence has no speculative flag)

2024-04-20 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114790

--- Comment #4 from Sam James  ---
I'm going to kick off a reduction but don't count on me either, as I hate doing
LTO ones.

[Bug lto/114790] ICE when building intel-compute-runtime (error: direct call to ... speculative call sequence has no speculative flag)

2024-04-20 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114790

--- Comment #3 from Sam James  ---
Created attachment 57997
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57997=edit
tracing_copy_imp.cpp.ii.xz

[Bug lto/114790] ICE when building intel-compute-runtime (error: direct call to ... speculative call sequence has no speculative flag)

2024-04-20 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114790

--- Comment #2 from Sam James  ---
Created attachment 57996
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57996=edit
tracing_device_imp.cpp.ii.xz

[Bug lto/114790] ICE when building intel-compute-runtime (error: direct call to ... speculative call sequence has no speculative flag)

2024-04-20 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114790

--- Comment #1 from Sam James  ---
Created attachment 57995
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57995=edit
tracing_imp.cpp.ii.xz

[Bug lto/114790] New: ICE when building intel-compute-runtime (error: direct call to ... speculative call sequence has no speculative flag)

2024-04-20 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114790

Bug ID: 114790
   Summary: ICE when building intel-compute-runtime (error: direct
call to ... speculative call sequence has no
speculative flag)
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57994
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57994=edit
ze.exports

Initially reported downstream in Gentoo at https://bugs.gentoo.org/930199.

```
$ g++-14 -fPIC -O2 -flto=auto -shared -Wl,--version-script=ze.exports -o
libze_intel_gpu.so.1.3.29138 tracing_imp.cpp.ii tracing_copy_imp.cpp.ii
tracing_device_imp.cpp.ii
/var/tmp/portage/dev-libs/intel-compute-runtime-24.13.29138.7/work/compute-runtime-24.13.29138.7/level_zero/experimental/source/tracing/tracing_copy_imp.cpp:
In function ‘zeCommandListAppendMemoryCopyTracing’:
/var/tmp/portage/dev-libs/intel-compute-runtime-24.13.29138.7/work/compute-runtime-24.13.29138.7/level_zero/experimental/source/tracing/tracing_copy_imp.cpp:41:35:
error: direct call to releaseActivetracersList/1531 in speculative call
sequence has no speculative flag
   41 | return
L0::apiTracerWrapperImp(driverDdiTable.coreDdiTable.CommandList.pfnAppendMemoryCopy,
  |   ^
_ZN2L019apiTracerWrapperImpIPF12_ze_result_tP25_ze_command_list_handle_tPvPKvmP18_ze_event_handle_tjPS8_EP44_ze_command_list_append_memory_copy_params_tPFvSD_S1_S4_PS4_ESt6vectorINS_25APITracerCallbackStateImpISG_EESaISJ_EESL_JRS3_RS4_RS6_RmRS8_RjRS9_EEES1_T_T0_T1_T2_T3_DpOT4_.isra.0/10477
(apiTracerWrapperImp.isra)
  Type: function definition analyzed
  Visibility: artificial
  References: _ZN2L019APITracerContextImp24releaseActivetracersListEv/1531
(addr) (speculative) _ZTHN2L017tracingInProgressE/5374 (addr)
_ZN2L017tracingInProgressE/1237 (write) _ZN2L025globalAPITracerContextImpE/1490
(addr)
  Referring:
  Read from file: /tmp/cciN484G.ltrans0.o
  Function apiTracerWrapperImp.isra/10477 is inline copy in
zeCommandListAppendMemoryCopyTracing/3756
  Availability: local
  Unit id: 3
  Function flags: count:143044205 (estimated locally) body local
  Called by: zeCommandListAppendMemoryCopyTracing/3756 (inlined) (143044205
(estimated locally),0.50 per call)
  Calls: _ZN2L019APITracerContextImp24releaseActivetracersListEv/1531
(114435364 (estimated locally),0.40 per call)
_ZNSt6vectorIPvSaIS0_EE6resizeEm.constprop.0/11584 (inlined) (143044205
(estimated locally),0.50 per call) (can throw external)
_ZNSt6vectorIN2L025APITracerCallbackStateImpIPFvP44_ze_command_list_append_memory_copy_params_t12_ze_result_tPvPS5_EEESaIS9_EE2atEm/10833
(inlined) (1157357666 (estimated locally),4.05 per call) (can throw external)
_ZNSt6vectorIN2L025APITracerCallbackStateImpIPFvP44_ze_command_list_append_memory_copy_params_t12_ze_result_tPvPS5_EEESaIS9_EE2atEm/4315
(inlined) (618839143 (estimated locally),2.16 per call) (can throw external)
_ZNSt6vectorIPvSaIS0_EEixEm.isra.0/11478 (inlined) (618839143 (estimated
locally),2.16 per call)
_ZNSt6vectorIN2L025APITracerCallbackStateImpIPFvP44_ze_command_list_append_memory_copy_params_t12_ze_result_tPvPS5_EEESaIS9_EE2atEm/11133
(inlined) (618839143 (estimated locally),2.16 per call) (can throw external)
_ZNSt6vectorIN2L025APITracerCallbackStateImpIPFvP44_ze_command_list_append_memory_copy_params_t12_ze_result_tPvPS5_EEESaIS9_EE2atEm/10733
(inlined) (1157357666 (estimated locally),4.05 per call) (can throw external)
_ZNSt6vectorIN2L025APITracerCallbackStateImpIPFvP44_ze_command_list_append_memory_copy_params_t12_ze_result_tPvPS5_EEESaIS9_EE2atEm/11033
(inlined) (618839143 (estimated locally),2.16 per call) (can throw external)
_ZNSt6vectorIPvSaIS0_EEixEm.isra.0/11462 (inlined) (618839143 (estimated
locally),2.16 per call)
_ZNSt6vectorIN2L025APITracerCallbackStateImpIPFvP44_ze_command_list_append_memory_copy_params_t12_ze_result_tPvPS5_EEESaIS9_EE2atEm/10933
(inlined) (618839143 (estimated locally),2.16 per call) (can throw external)
_ZTHN2L017tracingInProgressE/5374 (76485736 (estimated locally),0.27 per call)
(can throw external) _ZNSt12_Vector_baseIPvSaIS0_EED2Ev.isra.0/11539 (inlined)
(143044205 (estimated locally),0.50 per call)
_ZNSt12_Vector_baseIPvSaIS0_EED2Ev.isra.0/10508 (0 (precise),0.00 per call)
   Indirect call(618839143 (estimated locally),2.16 per call) (can throw
external) num speculative call targets: 0
   Indirect call(143044205 (estimated locally),0.50 per call) (can throw
external) num speculative call targets: 0
   Indirect call(618839143 (estimated locally),2.16 per call) (can throw
external) num speculative call targets: 0
   Indirect call(speculative) (28608841 (estimated locally),0.10 per call) (can
throw external) num speculative call targets: 1
during IPA pass: inline

[Bug c/114731] -Wincompatible-pointer-types false positive in combination with _Generic(3)

2024-04-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114731

--- Comment #4 from Sam James  ---
I think this sort of thing is somewhat common when it comes to something the
frontend can't even parse. But we'll see what others say.

[Bug libstdc++/114724] [Regression] libstdc++prettyprinters/debug.[cc|cxx11.cc] failing to build

2024-04-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114724

--- Comment #3 from Sam James  ---
For future reference, I recommend including the link to the other report, and
also CCing the author/committer of bisect results. Thanks!

[Bug libstdc++/114724] [Regression] libstdc++prettyprinters/debug.[cc|cxx11.cc] failing to build

2024-04-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114724

Sam James  changed:

   What|Removed |Added

 Resolution|INVALID |MOVED
 CC||sjames at gcc dot gnu.org
   See Also||https://sourceware.org/bugz
   ||illa/show_bug.cgi?id=31644

[Bug c/114731] -Wincompatible-pointer-types false positive in combination with _Generic(3)

2024-04-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114731

Sam James  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
 Ever confirmed|0   |1
   Last reconfirmed||2024-04-16
 CC||sjames at gcc dot gnu.org

--- Comment #1 from Sam James  ---
This example doesn't compile.

$ gcc-13 -Wall -Wextra -Wno-incompatible-pointer-types /tmp/foo.c $(pkgconf
--cflags --libs libbsd)
/tmp/foo.c: In function 'main':
/tmp/foo.c:11:9: error: expected specifier-qualifier-list before ')' token
   11 | )  
  \
  | ^
/tmp/foo.c:96:9: note: in expansion of macro 'a2i'
   96 | a2i(time_t, , "42", NULL, 0, 0, 10);
  | ^~~

[Bug target/114676] [12/13/14 Regression] DSE removes assignment that is used later

2024-04-12 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114676

Sam James  changed:

   What|Removed |Added

   Priority|P1  |P2

--- Comment #12 from Sam James  ---
P1->P2 after IRC discussion (we released with it & unclear what the intrinsic
behaviour is even supposed to be wrt tbaa).

[Bug ipa/114501] [11/12/13/14 Regression] ICE during modref with LTO

2024-04-08 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114501

Sam James  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #8 from Sam James  ---
This can be downgraded from P1 given we released with it.

[Bug ipa/113907] [11/12/13/14 regression] ICU miscompiled on x86 since r14-5109-ga291237b628f41

2024-04-08 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

--- Comment #72 from Sam James  ---
It's up to RMs of course but FWIW, the critical part of this for me is fixed
now and it could be a P2 now if desired.

[Bug target/112868] GCC passes -many to the assembler for --enable-checking=release builds

2024-04-08 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112868

--- Comment #10 from Sam James  ---
No problems reported yet and we have several people testing on ppc w/ gcc 14.

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257)

2024-04-03 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574

--- Comment #2 from Sam James  ---
Reduced:
```
struct X509_algor_st sk_X509_ALGOR_copyfunc(const struct X509_algor_st *);
struct X509_algor_st {
} PKCS8_pkey_get0(const struct X509_algor_st **) {
}
```

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257)

2024-04-03 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574

--- Comment #1 from Sam James  ---
reducing

[Bug lto/114574] New: [14 regression] ICE when building curl with LTO (internal compiler error: in fld_incomplete_type_of, at ipa-free-lang-data.cc:257)

2024-04-03 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574

Bug ID: 114574
   Summary: [14 regression] ICE when building curl with LTO
(internal compiler error: in fld_incomplete_type_of,
at ipa-free-lang-data.cc:257)
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57861
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57861=edit
libcurl_la-curl_ntlm_core.i.xz

Tonnes of these failures. Just picked curl at random.

```
$ x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse -DHAVE_CONFIG_H
-I/var/tmp/portage/net-misc/curl-8.7.1-r1/work/curl-8.7.1/include -I../lib
-I/var/tmp/portage/net-misc/curl-8.7.1-r1/work/curl-8.7.1/lib
-DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -fvisibility=hidden -O3 -pipe
-march=native -fdiagnostics-color=always -flto -fno-vect-cost-model
-fpermissive -Werror-implicit-function-declaration -c
/var/tmp/portage/net-misc/curl-8.7.1-r1/work/curl-8.7.1/lib/curl_ntlm_core.c 
-fPIC -DPIC -o .libs/libcurl_la-curl_ntlm_core.o
during IPA pass: *free_lang_data
/var/tmp/portage/net-misc/curl-8.7.1-r1/work/curl-8.7.1/lib/curl_ntlm_core.c:665:1:
internal compiler error: in fld_incomplete_type_of, at
ipa-free-lang-data.cc:257
  665 | }
  | ^
0x55f1b9e2de0f fld_incomplete_type_of
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/ipa-free-lang-data.cc:257
0x55f1bb41a2ad fld_simplified_type
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/ipa-free-lang-data.cc:344
0x55f1bb41a2ad free_lang_data_in_type
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/ipa-free-lang-data.cc:439
0x55f1bbaa5ad0 free_lang_data_in_cgraph
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/ipa-free-lang-data.cc:1072
0x55f1bbaa5ad0 free_lang_data
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/ipa-free-lang-data.cc:1109
0x55f1bbaa5ad0 execute
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/ipa-free-lang-data.cc:1176
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

'gcc -c libcurl_la-curl_ntlm_core.i -O2 -flto' is enough to reproduce. I last
built curl fine on 30th March, apparently.

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/14
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl,df
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 14.0. p,
commit 7bbfb01a32b73842f8908de028703510a0e12057' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point
--enable-targets=all --enable-libgomp --disable-libssp --disable-libada
--disable-cet --disable-systemtap --disable-valgrind-annotations
--disable-vtable-verify --disable-libvtv --with-zstd --without-isl
--enable-default-pie --enable-host-pie --disable-host-bind-now
--enable-default-ssp --disable-fixincludes --with-build-config='bootstrap-O3
bootstrap-lto'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240403 (experimental)
8455d6f6cd43b7b143ab9ee19437452fceba9cc9 (Gentoo 14.0. p, commit
7bbfb01a32b73842f8908de028703510a0e12057)
```

[Bug gcov-profile/114115] xz-utils segfaults when built with -fprofile-generate (bad interaction between IFUNC and binding?)

2024-04-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114115

--- Comment #11 from Sam James  ---
(In reply to Sam James from comment #10)
> I'm aware, but there's a minimised test case attached here which shows this
> is still somewhat of a problem by itself.
> 
> Either a better diagnostic is needed or to not instrument the resolver.

s/better// (we don't emit any rn)

[Bug gcov-profile/114115] xz-utils segfaults when built with -fprofile-generate (bad interaction between IFUNC and binding?)

2024-04-02 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114115

--- Comment #10 from Sam James  ---
I'm aware, but there's a minimised test case attached here which shows this is
still somewhat of a problem by itself.

Either a better diagnostic is needed or to not instrument the resolver.

[Bug c/114507] FR: Randomize order of evluation of function of arguments

2024-03-27 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114507

--- Comment #2 from Sam James  ---
That said, I feel as if it's more likely this is better for the analyser.

[Bug c/114507] FR: Randomize order of evluation of function of arguments

2024-03-27 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114507

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org

--- Comment #1 from Sam James  ---
Maybe we should have a metabug for hardening/debugging-style feature requests
like this (PR82179 comes to mind).

[Bug target/114487] ICE when building libsdl2 on -mfpmath=sse x86 with LTO

2024-03-27 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114487

--- Comment #12 from Sam James  ---
Ah, wait, no point with andrew's nicer testcase ;)

[Bug target/114487] ICE when building libsdl2 on -mfpmath=sse x86 with LTO

2024-03-27 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114487

--- Comment #11 from Sam James  ---
I'm going to upload the originals in case it offers more insight because the
return type isn't mismatched there.

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2024-03-27 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #15 from Sam James  ---
(The workaround flags could be reduced but at this point I just wanted a quick
workaround.)

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2024-03-27 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

Sam James  changed:

   What|Removed |Added

Summary|[12/13/14 regression]   |[12/13 regression]
   |llvm-tblgen miscompiled on  |llvm-tblgen miscompiled on
   |powerpc-unknown-linux-gnu   |powerpc-unknown-linux-gnu
   |since   |since
   |r12-5383-g22c242342e38eb|r12-5383-g22c242342e38eb
   See Also||https://bugs.gentoo.org/sho
   ||w_bug.cgi?id=880677,
   ||https://bugs.gentoo.org/sho
   ||w_bug.cgi?id=875776

--- Comment #14 from Sam James  ---
This seems "fixed" by r14-1909-g5a1ef1cfac0053. As a workaround, -fno-ipa-sra
-fno-ipa-modref -fno-ipa-icf works for GCC 12/13.

I don't really intend on spending more time on this though. I've got better at
debugging miscompilations since we filed this, but LLVM is still huge and not
easy for me to tackle.

[Bug lto/114505] static archives built with gcc --without-zstd cause ICE when read by gcc with zstd support

2024-03-27 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114505

--- Comment #6 from Sam James  ---
I'm confident I've seen this happen before but I haven't got a quick testcase
(it should be easy to make one, but I don't have a gcc w/ zstd right this
second.)

[Bug target/114487] ICE when building libsdl2 on -mfpmath=sse x86 with LTO

2024-03-27 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114487

--- Comment #7 from Sam James  ---
(You're right, by the way. The original fails with older GCC too. Sorry!)

[Bug ipa/94485] Inter-dependency between { tree-sra, ABI, inlining, loop-unrolling } leads to mis-optimization

2024-03-26 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94485

--- Comment #10 from Sam James  ---
ok, on godbolt, 8.5 fails. I think we're fine here then?

[Bug ipa/94485] Inter-dependency between { tree-sra, ABI, inlining, loop-unrolling } leads to mis-optimization

2024-03-26 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94485

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org

--- Comment #9 from Sam James  ---
Not sure if I'm doing something wrong or if it just got fixed in the 10 dev
cycle, but https://godbolt.org/z/x48xK9j67 is fine and so were the other
compilers I tried (9+).

[Bug ipa/114493] internal compiler error: in fld_incomplete_type_of, at ipa-free-lang-data.cc:257

2024-03-26 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114493

--- Comment #2 from Sam James  ---
Pfff.

```
typedef struct git_midx_writer git_midx_writer;
int git_futils_rmdir_flags;
int __attribute__git_midx_writer_new(git_midx_writer **);
struct __attribute__((__may_alias__)) git_midx_writer {};
```

[Bug ipa/114493] New: internal compiler error: in fld_incomplete_type_of, at ipa-free-lang-data.cc:257

2024-03-26 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114493

Bug ID: 114493
   Summary: internal compiler error: in fld_incomplete_type_of, at
ipa-free-lang-data.cc:257
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57819
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57819=edit
odb_pack.c.i.xz

11/12/13/14 all fail. 10 fails b/c of malloc attribute so needs to be checked.

I hit this after adding may_alias to a struct.

```
$ gcc src/libgit2/CMakeFiles/libgit2.dir/odb_pack.c.i -std=c90 -c -flto
during IPA pass: *free_lang_data
/home/sam/git/libgit2/src/libgit2/odb_pack.c:986:1: internal compiler error: in
fld_incomplete_type_of, at ipa-free-lang-data.cc:257
  986 | }
  | ^
0x55e8b946cd88 fld_incomplete_type_of
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/ipa-free-lang-data.cc:257
0x55e8baa704cd fld_simplified_type
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/ipa-free-lang-data.cc:344
0x55e8baa704cd free_lang_data_in_type
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/ipa-free-lang-data.cc:439
0x55e8bb0d2280 free_lang_data_in_cgraph
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/ipa-free-lang-data.cc:1072
0x55e8bb0d2280 free_lang_data
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/ipa-free-lang-data.cc:1109
0x55e8bb0d2280 execute
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/ipa-free-lang-data.cc:1176
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
``

[Bug target/114487] New: [14 regression] ICE when building libsdl2 on -mfpmath=sse x86 with LTO

2024-03-26 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114487

Bug ID: 114487
   Summary: [14 regression] ICE when building libsdl2 on
-mfpmath=sse x86 with LTO
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

I'm not sure if this is really a target bug, or an LTO option merging bug. I
suspect the issue comes down to mismatch of -mfpmath=sse and -msse -msse2 - but
I may be wrong.

Here's a reduction but it might be a bad one, as there's conflicting return
types here.

```
$ cat SDL_test_fuzzer.i
void SDLTest_RandomUnitFloat() { }
```

```
$ cat testautomation-testautomation_pixels.i
void SDLTest_RunSuites();

void SDLTest_AssertPass();
float SDLTest_RandomUnitFloat();
typedef struct {
  int testCase;
} SDLTest_TestCaseReference;
typedef struct {
  char *name;
  void *testSetUp;
  SDLTest_TestCaseReference *testCases;
  void *testTearDown;
} SDLTest_TestSuiteReference;
void pixels_calcGammaRamp() {
  float gamma = SDLTest_RandomUnitFloat();
  SDLTest_AssertPass(gamma);
}
SDLTest_TestCaseReference pixelsTests[] = {(int)pixels_calcGammaRamp};
SDLTest_TestSuiteReference pixelsTestSuite = {0, pixelsTests};

int main() {
  SDLTest_TestSuiteReference *testSuites = 
  SDLTest_RunSuites(testSuites);
}
```

```
$ gcc -O3 -pipe -march=i686 -mfpmath=sse -flto -mmmx -msse -msse2
-fno-strict-aliasing SDL_test_fuzzer.i -fPIC -o SDL_test_fuzzer.o -c
$ gcc -O3 -march=i686 -flto -o a testautomation-testautomation_pixels.i
SDL_test_fuzzer.o
testautomation-testautomation_pixels.i: In function ‘pixels_calcGammaRamp’:
testautomation-testautomation_pixels.i:17:1: error: unrecognizable insn:
   17 | }
  | ^
(insn 6 5 7 2 (set (reg/v:SF 100 [ gamma ])
(reg:SF 20 xmm0)) "testautomation-testautomation_pixels.i":15:17 -1
 (nil))
during RTL pass: vregs
testautomation-testautomation_pixels.i:17:1: internal compiler error: in
extract_insn, at recog.cc:2812
0x5722510f _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/rtl-error.cc:108
0x57225146 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/rtl-error.cc:116
0x56d46375 extract_insn(rtx_insn*)
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/recog.cc:2812
0x56d46375 instantiate_virtual_regs_in_insn
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/function.cc:1611
0x56d46375 instantiate_virtual_regs
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/function.cc:1994
0x56d46375 execute
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/function.cc:2041
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc/i686-pc-linux-gnu/14/../../../../i686-pc-linux-gnu/bin/ld: error:
lto-wrapper failed
collect2: error: ld returned 1 exit status
```

[Bug tree-optimization/114464] [14 regression] ICE when building tdscpp-20240212

2024-03-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114464

--- Comment #3 from Sam James  ---
Reduced:
```
template  void double_to_int(double, unsigned char *scratch, bool carry)
{
  for (int i = 0; i < N; i++) {
bool b = scratch[i] <<= 1;
if (carry)
  scratch[i] |= 1;
carry = b;
  }
}
double bcp_row_data_d;
unsigned char bcp_row_data_ptr;
bool carry;
void bcp_row_data() { double_to_int<16>(bcp_row_data_d, _row_data_ptr,
carry); }
```

[Bug tree-optimization/114471] [14 regression] ICE when building liblc3-1.0.4 with -fno-vect-cost-model -march=x86-64-v4

2024-03-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114471

--- Comment #3 from Sam James  ---
float quantize_x_1, quantize_x_0;
short *quantize_xq;
short quantize_x0;
void quantize() {
  short x1 = quantize_xq[0] =
  quantize_x0 + ((quantize_x0 > 0) & (quantize_x_0 < 0));
  quantize_xq[1] = 1 + ((x1 > 0) & (quantize_x_1 < 0));
}

[Bug tree-optimization/114471] [14 regression] ICE when building liblc3-1.0.4 with -fno-vect-cost-model -march=x86-64-v4

2024-03-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114471

--- Comment #2 from Sam James  ---
Created attachment 57812
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57812=edit
spec.i.orig.xz

[Bug tree-optimization/114471] [14 regression] ICE when building liblc3-1.0.4 with -fno-vect-cost-model -march=x86-64-v4

2024-03-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114471

--- Comment #1 from Sam James  ---
The original failed with:
```
../liblc3-1.0.4/src/spec.c: In function ‘quantize’:
../liblc3-1.0.4/src/spec.c:210:21: error: type mismatch in binary expression
  210 | LC3_HOT static void quantize(enum lc3_dt dt, enum lc3_srate sr,
  | ^~~~
vector(2) 

vector(2) 

vector(2) 

mask_patt_142.112_162 = mask__23.109_158 & mask_patt_141.111_161;
during GIMPLE pass: vect
../liblc3-1.0.4/src/spec.c:210:21: internal compiler error: verify_gimple
failed
0x559439cc2712 verify_gimple_in_cfg(function*, bool, bool)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240324/gcc-14-20240324/gcc/tree-cfg.cc:5663
0x559439ad9a28 execute_function_todo
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240324/gcc-14-20240324/gcc/passes.cc:2088
0x559439ad9c8b do_per_function
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240324/gcc-14-20240324/gcc/passes.cc:1687
0x559439ad9c8b execute_todo
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240324/gcc-14-20240324/gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
ninja: build stopped: subcommand failed.
```

i.e. vect, not slp.

[Bug tree-optimization/114471] New: [14 regression] ICE when building liblc3-1.0.4

2024-03-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114471

Bug ID: 114471
   Summary: [14 regression] ICE when building liblc3-1.0.4
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57811
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57811=edit
spec.c.i

Initially reported downstream in Gentoo by tdr.

```
$ gcc-14 /tmp/foo.c -c -O2 -fno-vect-cost-model -march=x86-64-v4
/tmp/foo.c: In function ‘quantize’:
/tmp/foo.c:4:6: error: type mismatch in binary expression
4 | void quantize(int i, short x1) {
  |  ^~~~
vector(2) 

vector(2) 

vector(2) 

mask_patt_47.14_40 = mask__2.11_44 & mask_patt_48.13_41;
during GIMPLE pass: slp
/tmp/foo.c:4:6: internal compiler error: verify_gimple failed
0x55ab954d6b85 verify_gimple_in_cfg(function*, bool, bool)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-cfg.cc:5663
0x55ab96a54818 execute_function_todo
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/passes.cc:2088
0x55ab96a54818 do_per_function
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/passes.cc:1687
0x55ab96a54818 execute_todo
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

[Bug target/114466] mips: ICE during RTL pass: zero_call_used_regs

2024-03-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114466

Sam James  changed:

   What|Removed |Added

 Resolution|DUPLICATE   |---
 Status|RESOLVED|UNCONFIRMED

--- Comment #3 from Sam James  ---
Oh, no, it isn't. Yeah, preprocessed source please.

[Bug target/114466] mips: ICE during RTL pass: zero_call_used_regs

2024-03-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114466

--- Comment #2 from Sam James  ---
Also:
>Please submit a full bug report, with preprocessed source (by using 
>-freport-bug).

But no need here.

[Bug target/110934] m68k: ICE with -fzero-call-used-regs=all compiling openssh 9.3p2

2024-03-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110934

Sam James  changed:

   What|Removed |Added

 CC||rene at exactcode dot de

--- Comment #16 from Sam James  ---
*** Bug 114466 has been marked as a duplicate of this bug. ***

[Bug target/114466] mips: ICE during RTL pass: zero_call_used_regs

2024-03-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114466

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org
 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Sam James  ---
Dupe.

*** This bug has been marked as a duplicate of bug 110934 ***

[Bug tree-optimization/114464] [14 regression] ICE when building tdscpp-20240212

2024-03-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114464

--- Comment #2 from Sam James  ---
Ah, yes, sorry. Reducing too.

[Bug middle-end/114464] New: [14 regression] ICE when building tdscpp-20240212

2024-03-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114464

Bug ID: 114464
   Summary: [14 regression] ICE when building tdscpp-20240212
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57808
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57808=edit
bcp.cpp.ii.xz

```
$ g++ -c bcp.cpp.ii -O2 -std=gnu++23
/var/tmp/portage/dev-db/tdscpp-20240212/work/tdscpp-20240212/src/bcp.cpp: In
function ‘void tds::bcp_row_data(uint8_t*&, const col_info&, const value&,
std::u16string_view)’:
/var/tmp/portage/dev-db/tdscpp-20240212/work/tdscpp-20240212/src/bcp.cpp:578:10:
error: incompatible types in ‘PHI’ argument 0
  578 | void bcp_row_data(uint8_t*& ptr, const col_info& col, const value&
vv, u16string_view col_name) {
  |  ^~~~
vector(16) unsigned char

vector(16) 

vect_vec_recur_.4107_221 = PHI 
/var/tmp/portage/dev-db/tdscpp-20240212/work/tdscpp-20240212/src/bcp.cpp:578:10:
error: type mismatch in ‘vec_perm_expr’
vector(16) unsigned char
vector(16) unsigned char
vector(16) 
vector(16) ssizetype
_2739 = VEC_PERM_EXPR ;
during GIMPLE pass: vect
/var/tmp/portage/dev-db/tdscpp-20240212/work/tdscpp-20240212/src/bcp.cpp:578:10:
internal compiler error: verify_gimple failed
0x558d86f1abae verify_gimple_in_cfg(function*, bool, bool)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-cfg.cc:5663
0x558d886683f4 execute_function_todo
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/passes.cc:2088
0x558d886683f4 do_per_function
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/passes.cc:1687
0x558d886683f4 execute_todo
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

[Bug testsuite/109549] [14 Regression] Conditional move regressions after r14-53-g675b1a7f113adb1d737adaf78b4fd90be7a0ed1a

2024-03-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109549

--- Comment #14 from Sam James  ---
Hi Stefan, you should be able to change your email on bugzilla to
@gcc.gnu.org and gain permissions.

[Bug lto/113208] [14 Regression] lto1: error: Alias and target's comdat groups differs since r14-5979-g99d114c15523e0

2024-03-24 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113208

--- Comment #15 from Sam James  ---
Created attachment 57802
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57802=edit
src_data_test_QualityValues.cpp.ii.orig.xz

  1   2   3   4   5   6   7   8   9   10   >