gcc-12-20211114 is now available

2021-11-14 Thread GCC Administrator via Gcc
Snapshot gcc-12-2024 is now available on https://gcc.gnu.org/pub/gcc/snapshots/12-2024/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 12 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

Can I provide a hint to gcc for return value optimization?

2021-11-14 Thread unlvsur unlvsur via Gcc
I want give a hint to gcc that allows std::string to rvo. Is that possible? Any attribute for doing that? Sent from Mail for Windows

[Bug tree-optimization/103229] New: gcc/gimple-range-cache.cc:654:10: runtime error: null pointer passed as argument 1, which is declared to never be null

2021-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103229 Bug ID: 103229 Summary: gcc/gimple-range-cache.cc:654:10: runtime error: null pointer passed as argument 1, which is declared to never be null Product: gcc

[Bug tree-optimization/103229] gcc/gimple-range-cache.cc:654:10: runtime error: null pointer passed as argument 1, which is declared to never be null

2021-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103229 Martin Liška changed: What|Removed |Added Known to fail||12.0 Last reconfirmed|

[Bug bootstrap/80047] fixincludes/fixincl.c: PVS-Studio: Improper Release of Memory Before Removing Last Reference (CWE-401)

2021-11-14 Thread xry111 at mengyan1223 dot wang via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80047 --- Comment #10 from Xi Ruoyao --- Fixed in trunk. I'm not sure if this should be backported.

[Bug c++/87656] Useful flags to enable with -Wall or -Wextra

2021-11-14 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87656 --- Comment #9 from Segher Boessenkool --- (In reply to Eric Gallager from comment #8) > Any reason not to put -Wnested-externs in -Wall or -Wextra? It warns for any "extern" declaration in other than file scope. This is completely standard C,

[Bug tree-optimization/103229] gcc/gimple-range-cache.cc:654:10: runtime error: null pointer passed as argument 1, which is declared to never be null

2021-11-14 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103229 --- Comment #3 from CVS Commits --- The master branch has been updated by Aldy Hernandez : https://gcc.gnu.org/g:a7ef5da3a9c348c35abb72d6f64f209f5661cfa4 commit r12-5242-ga7ef5da3a9c348c35abb72d6f64f209f5661cfa4 Author: Aldy Hernandez Date:

[Bug tree-optimization/103229] gcc/gimple-range-cache.cc:654:10: runtime error: null pointer passed as argument 1, which is declared to never be null

2021-11-14 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103229 Aldy Hernandez changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug other/63426] [meta-bug] Issues found with -fsanitize=undefined

2021-11-14 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426 Bug 63426 depends on bug 103229, which changed state. Bug 103229 Summary: gcc/gimple-range-cache.cc:654:10: runtime error: null pointer passed as argument 1, which is declared to never be null https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103229

Re: [PATCH] rs6000: Fix a handful of 32-bit built-in function problems in the new support

2021-11-14 Thread Bill Schmidt via Gcc-patches
On 11/11/21 10:50 AM, Bill Schmidt wrote: > On 11/11/21 7:11 AM, Segher Boessenkool wrote: >> void f(long x) { __builtin_set_texasr(x); } >> >> built with -m32 -mpowerpc64 gives (in the expand dump): >> >> void f (long int x) >> { >> long long unsigned int _1; >> >> ;; basic block 2, loop

Re: [COMMITTED] Do not pass NULL to memset in ssa_global_cache.

2021-11-14 Thread Aldy Hernandez via Gcc-patches
Ok, done. Pushed. Aldy On Sun, Nov 14, 2021 at 2:53 PM Martin Liška wrote: > > On 11/14/21 14:15, Aldy Hernandez wrote: > > The code computing ranges in PHIs in the path solver reuses the > > temporary ssa_global_cache by calling its clear method. Calling it on > > an empty cache causes us to

Re: [PATCH] rs6000: Fix a handful of 32-bit built-in function problems in the new support

2021-11-14 Thread Segher Boessenkool
Hi! On Sun, Nov 14, 2021 at 08:17:41AM -0600, Bill Schmidt wrote: > On 11/11/21 10:50 AM, Bill Schmidt wrote: > > On 11/11/21 7:11 AM, Segher Boessenkool wrote: > >> void f(long x) { __builtin_set_texasr(x); } > >> > >> built with -m32 -mpowerpc64 gives (in the expand dump): > >> > >> void f

[Bug libfortran/95177] error: array subscript has type char

2021-11-14 Thread roland.illig at gmx dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95177 --- Comment #15 from Roland Illig --- (In reply to Steve Kargl from comment #9) > I'm still trying to understand how an > option names -Werror=char-subscripts could trigger an > error. There are no subscripts. There _are_ subscripts, just look

[Bug tree-optimization/103231] New: ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault

2021-11-14 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
0.0 20211114 (experimental) [master r12-5239-ga8029add306] (GCC) [659] % [659] % gcctk -O0 -w small.c [660] % [660] % gcctk -O1 -w small.c [661] % gcctk -O1 -w small.c [662] % gcctk -O1 -w small.c gcctk: internal compiler error: Segmentation fault signal terminated program cc1 Please submit a f

[Bug tree-optimization/102906] [12 regression] gcc.target/arm/ivopts-4.c fails since r12-4526

2021-11-14 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102906 Aldy Hernandez changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Cleanup hadnling of modref access_nodes in tree-ssa-alias and tree-ssa-dse

2021-11-14 Thread Jan Hubicka via Gcc-patches
Hi, this is variant I comitted. Commonizing the code exposed that I can drop memory walking when parameter passed is NULL (under assumption of flag_delete_null_pointer_checks) since it can not point to useful memory. This was already done in tree-ssa-alias, but not in tree-ssa-dse. This needed

[Bug tree-optimization/103231] [12 Regression] ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r12-5014-g6b8b959675a3e14c

2021-11-14 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103231 --- Comment #6 from Zhendong Su --- (In reply to Martin Liška from comment #5) > Simplified test-case: Oh, great; thanks, Martin!

[PATCH] tsan: remove not needed -ldl in options

2021-11-14 Thread Martin Liška
Tested and pushed to master as obvious. Martin gcc/testsuite/ChangeLog: * c-c++-common/tsan/free_race.c: Remove unnecessary -ldl. * c-c++-common/tsan/free_race2.c: Likewise. --- gcc/testsuite/c-c++-common/tsan/free_race.c | 2 +- gcc/testsuite/c-c++-common/tsan/free_race2.c |

[COMMITTED] Do not pass NULL to memset in ssa_global_cache.

2021-11-14 Thread Aldy Hernandez via Gcc-patches
The code computing ranges in PHIs in the path solver reuses the temporary ssa_global_cache by calling its clear method. Calling it on an empty cache causes us to call memset with NULL. [The testcase doesn't fail without the patch. I suppose it needs some usbsan magic, or to live somewhere

Re: [PATCH 0/6] RFC: adding support to GCC for detecting trust boundaries

2021-11-14 Thread Miguel Ojeda via Gcc-patches
On Sat, Nov 13, 2021 at 9:37 PM David Malcolm wrote: > > #define __user __attribute__((untrusted)) > > where my patched GCC treats > T * > vs > T __attribute__((untrusted)) * > as being different types and thus the C frontend can complain (even without > -fanalyzer) about e.g.: This one

[Bug c++/103232] scoped template specalization is not supported (not with C+17 nor C++20)

2021-11-14 Thread dl.soluz at gmx dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103232 --- Comment #1 from dennis luehring --- gcc 11.2 https://gcc.godbolt.org/z/jG8f6Phjc clang 7 https://gcc.godbolt.org/z/c4Md5Yh1x

[Bug c++/103233] Warning from system libraries in user code: CWE-476 -Werror=analyzer-null-dereference

2021-11-14 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103233 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|

[Bug c++/85282] CWG 727 (full specialization in non-namespace scope)

2021-11-14 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282 Patrick Palka changed: What|Removed |Added CC||dl.soluz at gmx dot net --- Comment #16

[Bug ipa/103230] ipa-modref-tree.h:550:33: runtime error: load of value 255, which is not a valid value for type 'bool'

2021-11-14 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103230 --- Comment #1 from hubicka at kam dot mff.cuni.cz --- > Happens with UBSAN compiler for: > > $ gcc gcc/testsuite/gcc.c-torture/execute/pr71494.c -O1 -flto > ... > /home/marxin/Programming/gcc/gcc/ipa-modref-tree.h:550:33: runtime error: load

Re: [Bug ipa/103230] New: ipa-modref-tree.h:550:33: runtime error: load of value 255, which is not a valid value for type 'bool'

2021-11-14 Thread Jan Hubicka via Gcc-bugs
> Happens with UBSAN compiler for: > > $ gcc gcc/testsuite/gcc.c-torture/execute/pr71494.c -O1 -flto > ... > /home/marxin/Programming/gcc/gcc/ipa-modref-tree.h:550:33: runtime error: load > of value 255, which is not a valid value for type 'bool' > #0 0x18acc38 in

Re: [Bug ipa/103230] ipa-modref-tree.h:550:33: runtime error: load of value 255, which is not a valid value for type 'bool'

2021-11-14 Thread Jan Hubicka via Gcc-bugs
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103230 > > --- Comment #2 from Martin Liška --- > > How do you build ubsan compiler? > > F="-O0 -g -fsanitize=undefined" ; make -j16 all-host -k CFLAGS="$F" > CXXFLAGS="$F" LDFLAGS="$F" > > is the fastest approach. Thanks, it is similar to what I

Re: [r12-5236 Regression] FAIL: gcc.dg/tree-prof/merge_block.c scan-tree-dump-not optimized "Invalid sum" on Linux/x86_64

2021-11-14 Thread Jan Hubicka via Gcc-patches
> On Linux/x86_64, > > 5aa91072e24c1e16a5ec641b48b64c9c9f199f13 is the first bad commit > commit 5aa91072e24c1e16a5ec641b48b64c9c9f199f13 > Author: Jan Hubicka > Date: Sat Nov 13 22:25:23 2021 +0100 > > Implement DSE of dead functions calls storing memory. > > caused > > FAIL:

[Bug tree-optimization/103226] [12 Regression] Recent change to copy-headers causes execution failure for gcc.dg/torture/pr80974

2021-11-14 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103226 Aldy Hernandez changed: What|Removed |Added CC||rguenth at gcc dot gnu.org ---

[Bug tree-optimization/103231] [12 Regression] ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r12-5014-g6b8b959675a3e14c

2021-11-14 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103231 --- Comment #8 from Aldy Hernandez --- Created attachment 51789 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51789=edit similar problem on aarch64 kernel

[Bug tree-optimization/103231] [12 Regression] ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r12-5014-g6b8b959675a3e14c

2021-11-14 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103231 Aldy Hernandez changed: What|Removed |Added CC||amacleod at redhat dot com,

Re: [PATCH] tsan: remove not needed -ldl in options

2021-11-14 Thread Jan Hubicka via Gcc-patches
> Tested and pushed to master as obvious. > > Martin > > gcc/testsuite/ChangeLog: > > * c-c++-common/tsan/free_race.c: Remove unnecessary -ldl. > * c-c++-common/tsan/free_race2.c: Likewise. Thank you, I cut it from the other testcase and forgot to remove it. Patch is OK. Honza

[Bug c++/103232] scoped template specalization is not supported (not with C+17 nor C++20)

2021-11-14 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103232 Patrick Palka changed: What|Removed |Added CC||ppalka at gcc dot gnu.org

[Bug ipa/103234] New: ipa-sra is broken (and therefore disabled) on variably sized parameters

2021-11-14 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103234 Bug ID: 103234 Summary: ipa-sra is broken (and therefore disabled) on variably sized parameters Product: gcc Version: 12.0 Status: UNCONFIRMED Severity:

[Bug fortran/102043] Wrong array types used for negative stride accesses

2021-11-14 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102043 --- Comment #14 from Mikael Morin --- Created attachment 51787 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51787=edit draft patch This "fixes" the problem of negative index access, and adjusts vector subscript handling, so that

[Bug ipa/103230] ipa-modref-tree.h:550:33: runtime error: load of value 255, which is not a valid value for type 'bool'

2021-11-14 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103230 --- Comment #3 from hubicka at kam dot mff.cuni.cz --- > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103230 > > --- Comment #2 from Martin Liška --- > > How do you build ubsan compiler? > > F="-O0 -g -fsanitize=undefined" ; make -j16

[Bug ipa/103230] ipa-modref-tree.h:550:33: runtime error: load of value 255, which is not a valid value for type 'bool'

2021-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103230 --- Comment #5 from Martin Liška --- The canonical approach would be using config/bootstrap-ubsan.mk config file.

Cleanup hadnling of modref access_nodes in tree-ssa-alias and tree-ssa-dse

2021-11-14 Thread Jan Hubicka via Gcc-patches
Hi, this patch implements the cleanup suggested by Richard to move code getting tree op from access_node and stmt to a common place. I also commonized logic to build ao_ref. While I was on it I also replaced FOR_EACH_* by range for since they reads better. Bootstrapped/regtesed x86_64-linux,

[Bug tree-optimization/103229] gcc/gimple-range-cache.cc:654:10: runtime error: null pointer passed as argument 1, which is declared to never be null

2021-11-14 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103229 --- Comment #2 from Aldy Hernandez --- (In reply to Aldy Hernandez from comment #1) > Untested, but if someone wants to test and commit, feel free. Nevermind, I'll pass it through the gauntlet and commit.

[Bug tree-optimization/103231] ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103231 Andrew Pinski changed: What|Removed |Added Version|unknown |12.0 Keywords|

[Bug c++/103233] Warning from system libraries in user code: CWE-476 -Werror=analyzer-null-dereference

2021-11-14 Thread colomar.6.4.3 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103233 --- Comment #1 from Alejandro Colomar --- $ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux bookworm/sid" NAME="Debian GNU/Linux" ID=debian HOME_URL="https://www.debian.org/; SUPPORT_URL="https://www.debian.org/support;

[Bug tree-optimization/103235] New: [12 Regression] Recent change to atomics triggers ICE

2021-11-14 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103235 Bug ID: 103235 Summary: [12 Regression] Recent change to atomics triggers ICE Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug ipa/103230] ipa-modref-tree.h:550:33: runtime error: load of value 255, which is not a valid value for type 'bool'

2021-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103230 --- Comment #2 from Martin Liška --- > How do you build ubsan compiler? F="-O0 -g -fsanitize=undefined" ; make -j16 all-host -k CFLAGS="$F" CXXFLAGS="$F" LDFLAGS="$F" is the fastest approach.

[Bug fortran/102043] Wrong array types used for negative stride accesses

2021-11-14 Thread tkoenig at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102043 Thomas Koenig changed: What|Removed |Added CC||sandra at codesourcery dot com ---

[Bug ipa/103230] ipa-modref-tree.h:550:33: runtime error: load of value 255, which is not a valid value for type 'bool'

2021-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103230 --- Comment #4 from Martin Liška --- (In reply to hubicka from comment #3) > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103230 > > > > --- Comment #2 from Martin Liška --- > > > How do you build ubsan compiler? > > > > F="-O0 -g

[Bug tree-optimization/103219] [12 Regression] ICE Segmentation fault at -O3 (during GIMPLE pass: unrolljam) since r12-4526-gd8edfadfc7a9795b

2021-11-14 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103219 Aldy Hernandez changed: What|Removed |Added Last reconfirmed||2021-11-14 Ever confirmed|0

[Bug tree-optimization/103231] ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault

2021-11-14 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103231 --- Comment #1 from hubicka at kam dot mff.cuni.cz --- > [659] % > [659] % gcctk -O0 -w small.c > [660] % > [660] % gcctk -O1 -w small.c > [661] % gcctk -O1 -w small.c > [662] % gcctk -O1 -w small.c > gcctk: internal compiler error:

Re: [Bug tree-optimization/103231] New: ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault

2021-11-14 Thread Jan Hubicka via Gcc-bugs
> [659] % > [659] % gcctk -O0 -w small.c > [660] % > [660] % gcctk -O1 -w small.c > [661] % gcctk -O1 -w small.c > [662] % gcctk -O1 -w small.c > gcctk: internal compiler error: Segmentation fault signal terminated program > cc1 > Please submit a full bug report, > with preprocessed source if

[Bug tree-optimization/103231] ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault

2021-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103231 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org Last

[Bug tree-optimization/103231] [12 Regression] ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r12-5014-g6b8b959675a3e14c

2021-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103231 --- Comment #4 from Martin Liška --- Started with r12-5014-g6b8b959675a3e14c.

[Bug tree-optimization/103231] [12 Regression] ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r12-5014-g6b8b959675a3e14c

2021-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103231 --- Comment #5 from Martin Liška --- Simplified test-case: cat pr103231.c void BHbHb2l_1912(); int a; int bs; long g_1496_BK8K8el_2738; long fn1_l_1522; int fn1_l_1708; int fn1_l_2085; int fn1_l_2664; int fn1_bv; int fn1_l_2354; int

Re: [COMMITTED] Do not pass NULL to memset in ssa_global_cache.

2021-11-14 Thread Martin Liška
On 11/14/21 14:15, Aldy Hernandez wrote: The code computing ranges in PHIs in the path solver reuses the temporary ssa_global_cache by calling its clear method. Calling it on an empty cache causes us to call memset with NULL. [The testcase doesn't fail without the patch. I suppose it needs

[Bug tree-optimization/58483] missing optimization opportunity for const std::vector compared to std::array

2021-11-14 Thread dl.soluz at gmx dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58483 --- Comment #16 from dennis luehring --- the sample still gets reduced by clang to 160 with -O2 or -O3 clang: main: # @main mov eax, 160 ret and gcc 11.2/trunk producing -O2 main:

[Bug c++/103233] New: Warning from system libraries in user code: CWE-476 -Werror=analyzer-null-dereference

2021-11-14 Thread colomar.6.4.3 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103233 Bug ID: 103233 Summary: Warning from system libraries in user code: CWE-476 -Werror=analyzer-null-dereference Product: gcc Version: unknown Status: UNCONFIRMED

[Bug tree-optimization/103231] [12 Regression] ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r12-5014-g6b8b959675a3e14c

2021-11-14 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103231 --- Comment #9 from Zhendong Su --- A very simple repro (with ulimit -s 32): [530] % compile.sh small.c *** Compiling with: gcctk -O1 small.c gcctk: internal compiler error: Segmentation fault signal terminated program cc1 Please submit a full

[Bug tree-optimization/103231] [12 Regression] ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r12-5014-g6b8b959675a3e14c

2021-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103231 --- Comment #11 from Martin Liška --- But yes, with ulimit -s 512, one can reduce it to: $ cat pr103231.c long g_1496_BK8K8el_2738; int fn1_l_1522; int fn1_l_2664; long fn1_l_1761; unsigned int fn1_l_1812; int fn1_l_2189; int fn1_by; int

[Bug ipa/103230] New: ipa-modref-tree.h:550:33: runtime error: load of value 255, which is not a valid value for type 'bool'

2021-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103230 Bug ID: 103230 Summary: ipa-modref-tree.h:550:33: runtime error: load of value 255, which is not a valid value for type 'bool' Product: gcc Version: 12.0 Status:

[Bug ipa/103230] ipa-modref-tree.h:550:33: runtime error: load of value 255, which is not a valid value for type 'bool'

2021-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103230 Martin Liška changed: What|Removed |Added Ever confirmed|0 |1 Known to fail|

[Bug tree-optimization/102943] [12 Regression] Jump threader compile-time hog with 521.wrf_r

2021-11-14 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102943 --- Comment #28 from Jan Hubicka --- Bit unrelated but shows that threader seems bit expensive on other builds too. Getting stats from cc1plus LTO-link with -flto-partition=one it seems that backwards threader and dom are two slowest tree

[Bug tree-optimization/103229] gcc/gimple-range-cache.cc:654:10: runtime error: null pointer passed as argument 1, which is declared to never be null

2021-11-14 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103229 --- Comment #1 from Aldy Hernandez --- Untested, but if someone wants to test and commit, feel free. diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc index a63e20e7e49..b347edeb474 100644 --- a/gcc/gimple-range-cache.cc +++

Re: [PATCH] Ada, Darwin : Use DSYMUTIL_FOR_TARGET in libgnat/gnarl builds.

2021-11-14 Thread Arnaud Charlet via Gcc-patches
> Most of the time we get away with using the dsymutil that is > installed with the latest Xcode, however for some cross-compilation > cases that does not work. > > We now have the ability to specify the correct dsymutil to use for > the toolchain (--with-dsymutil=) and we should use that

[PATCH] Enhance unordered container merge

2021-11-14 Thread François Dumont via Gcc-patches
    libstdc++: Unordered containers merge re-use hash code.     When merging between 2 unordered containers with same hasher we can re-use     the cached hash code if any.     Use previous insert iterator as a hint for the next insert in case of multi container.     *

[Bug c++/103232] New: scoped template specalization is not supported (not with C+17 nor C++20)

2021-11-14 Thread dl.soluz at gmx dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103232 Bug ID: 103232 Summary: scoped template specalization is not supported (not with C+17 nor C++20) Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity:

[Bug analyzer/103233] Warning from system libraries in user code: CWE-476 -Werror=analyzer-null-dereference

2021-11-14 Thread alx.manpages at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103233 --- Comment #3 from alx.manpages at gmail dot com --- Hi Jonathan, On 11/14/21 15:57, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103233 > > Jonathan Wakely changed: > > What|Removed

[Bug tree-optimization/103231] [12 Regression] ICE (nondeterministic) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r12-5014-g6b8b959675a3e14c

2021-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103231 --- Comment #10 from Martin Liška --- (In reply to Zhendong Su from comment #9) > A very simple repro (with ulimit -s 32): Well, using a stack limit of 32B does not make sense, pretty much any executable hits stack overflow with such a small

[Bug fortran/102043] Wrong array types used for negative stride accesses

2021-11-14 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102043 Mikael Morin changed: What|Removed |Added Attachment #51787|0 |1 is obsolete|

[Bug tree-optimization/103235] [12 Regression] Recent change to atomics triggers ICE

2021-11-14 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103235 --- Comment #2 from Jeffrey A. Law --- Can you please double-check? It just reproduced for me. Perhaps you were missing -I./ which is sometimes needed for cross toolchains to *-linux. [jlaw@dl360p gcc]$ ./cc1 -O2 pthread_cancel.i -I./ -quiet

[Bug c++/103239] New: confusing template argument deduction error message

2021-11-14 Thread ich.freak at gmx dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103239 Bug ID: 103239 Summary: confusing template argument deduction error message Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3

Re: [PATCH,FORTRAN] Fix memory leak in finalization wrappers

2021-11-14 Thread Bernhard Reutner-Fischer via Gcc-patches
On Sun, 7 Nov 2021 13:32:34 +0100 Mikael Morin wrote: > > btw.. Just because it's vagely related. > > I think f8add009ce300f24b75e9c2e2cc5dd944a020c28 for > > PR fortran/88009 (ICE in find_intrinsic_vtab, at fortran/class.c:2761) > > is incomplete in that i think all the internal class helpers

[Bug c++/103239] missing reason why template argument deduction/substitution failed

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103239 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Known to fail|

[PATCH] PR tree-optimization/103216: optimize some A ? (b op CST) : b into b op (A?CST:CST2)

2021-11-14 Thread apinski--- via Gcc-patches
From: Andrew Pinski For this PR, we have: if (d_5 < 0) goto ; [INV] else goto ; [INV] : v_7 = c_4 | -128; : # v_1 = PHI Which PHI-OPT will try to simplify "(d_5 < 0) ? (c_4 | -128) : c_4" which is not handled currently. This adds a few patterns which allows to try to

[Bug tree-optimization/103235] [12 Regression] Recent change to atomics triggers ICE

2021-11-14 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103235 H.J. Lu changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug c++/101853] [12 Regression] g++.dg/modules/xtreme-header-5_b.C ICE

2021-11-14 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101853 --- Comment #6 from Hans-Peter Nilsson --- (In reply to seurer from comment #5) > I am still seeing these today with > g:a40970cf043553f0ca09a3b7be1c5a949623d915, r12-4318 [list elided] For cris-elf too. For cris-elf, be5bdccd865b (r12-4056)

[Bug tree-optimization/103215] [12 regression] gcc generates unexpected warnings on libx11-1.7.2: error: array subscript -2 is outside array bounds of since r12-3124-g820f0940d7ace130

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103215 --- Comment #5 from Andrew Pinski --- (In reply to Sergei Trofimovich from comment #4) > Created attachment 51792 [details] > gdb-bug.cc That was filed as PR 102216.

[Bug c++/103236] [9/10/11/12 Regression] ICE: in tsubst_pack_expansion, at cp/pt.c:13162

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103236 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |9.5 Ever confirmed|0

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2021-11-14 Thread Antoni Boucher via Gcc-patches
David: PING Le mardi 12 octobre 2021 à 22:09 -0400, Antoni Boucher a écrit : > David: PING > > Le lundi 27 septembre 2021 à 20:53 -0400, Antoni Boucher a écrit : > > I fixed an issue (it would show an error message when > > gcc_jit_type_dyncast_function_ptr_type was called on a type > >

[Bug tree-optimization/103235] [12 Regression] Recent change to atomics triggers ICE

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103235 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |12.0 Keywords|

[PATCH v1 2/2] RISC-V: Add instruction fusion (for ventana-vt1)

2021-11-14 Thread Philipp Tomsich
From: Philipp Tomsich The Ventana VT1 core supports quad-issue and instruction fusion. This implemented TARGET_SCHED_MACRO_FUSION_P to keep fusible sequences together and adds idiom matcheing for the supported fusion cases. gcc/ChangeLog: * config/riscv/riscv.c (enum

[PATCH v1 1/2] RISC-V: Add basic support for the Ventana-VT1 core

2021-11-14 Thread Philipp Tomsich
From: Philipp Tomsich The Ventana-VT1 core is compatible with rv64gc and Zb[abcs]. This introduces a placeholder -mcpu=ventana-vt1, so tooling and scripts don't need to change once full support (pipeline, tuning, etc.) will become public later. gcc/ChangeLog: *

[PATCH] Fortran: Mark internal symbols as artificial [PR88009,PR68800]

2021-11-14 Thread Bernhard Reutner-Fischer via Gcc-patches
Hi! Amend fix for PR88009 to mark all these class components as artificial. gcc/fortran/ChangeLog: * class.c (gfc_build_class_symbol, generate_finalization_wrapper, (gfc_find_derived_vtab, find_intrinsic_vtab): Use stringpool for names. Mark internal symbols as

Use modref kills in tree-ssa-dse

2021-11-14 Thread Jan Hubicka via Gcc-patches
Hi, this patch extends tree-ssa-dse to use modref kill summary to clear live_bytes. This makes it possible to remove calls that are killed in parts. I noticed that DSE duplicates the logic of tree-ssa-alias that is mathing bases of memory accesses. Here operands_equal_p (base1, base,

Re: [PATCH] Enhance unordered container merge

2021-11-14 Thread Jonathan Wakely via Gcc-patches
On Sun, 14 Nov 2021 at 13:31, François Dumont via Libstdc++ wrote: > > libstdc++: Unordered containers merge re-use hash code. > > When merging between 2 unordered containers with same hasher we can > re-use > the cached hash code if any. Instead of introducing the

[Bug fortran/102043] Wrong array types used for negative stride accesses

2021-11-14 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102043 --- Comment #16 from Bernhard Reutner-Fischer --- In addition to comment #1 here's an excerpt of an existing test with just one dimension: $ cat f_pr86389.f90 ! PR 19239. Check for various kinds of vector subscript. In this test, ! all

[Bug fortran/102043] Wrong array types used for negative stride accesses

2021-11-14 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102043 --- Comment #17 from Bernhard Reutner-Fischer --- Do we want to address arrays always at position 0 (maybe to help graphite ?) or would it be sufficient to just not dereference the array "before" the first position like Mikael suggests in

[Bug c++/103236] New: ICE: in tsubst_pack_expansion, at cp/pt.c:13162

2021-11-14 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103236 Bug ID: 103236 Summary: ICE: in tsubst_pack_expansion, at cp/pt.c:13162 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug tree-optimization/103235] [12 Regression] Recent change to atomics triggers ICE

2021-11-14 Thread hjl.tools at gmail dot com via Gcc-bugs
-csky-linux --with-local-prefix=/usr/local --with-system-zlib --disable-libcc1 --disable-libcilkrts --disable-libsanitizer --disable-libmpx --enable-languages=c,c++ Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.0 2024 (experimental) (GCC) [hjl@gnu-cfl-2

[committed] VAX: Add the `setmemhi' instruction

2021-11-14 Thread Maciej W. Rozycki
The MOVC5 machine instruction has `memset' semantics if encoded with a zero source length[1]: "4. MOVC5 with a zero source length operand is the preferred way to fill a block of memory with the fill character." Use that instruction to implement the `setmemhi' instruction then. Use the AP

[Bug tree-optimization/103237] [10/11/12 Regression] wrong code with -ftree-vectorize at -O1 on x86_64-linux-gnu

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103237 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Summary|wrong code with

[Bug tree-optimization/103219] [12 Regression] ICE Segmentation fault at -O3 (during GIMPLE pass: unrolljam) since r12-4526-gd8edfadfc7a9795b

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103219 --- Comment #2 from Andrew Pinski --- (In reply to Aldy Hernandez from comment #1) > Looks like a latent bug elsewhere as we're not threading anything. For that > matter, test fails even with -fno-thread-jumps. Right, it is a dup of one of

Track nondeterminism and interposable calls in ipa-modref

2021-11-14 Thread Jan Hubicka via Gcc-patches
Hi, This patch adds tracking of two new flags in ipa-modref: nondeterministic and calls_interposable. First is set when function does something that is not guaranteed to be the same if run again (volatile memory access, volatile asm or external function call). Second is set if function calls

[Bug sanitizer/102911] AddressSanitizer: CHECK failed: asan_malloc_linux.cpp:46

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102911 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|---

[Bug target/21824] [meta-bug] bootstrap bugs for *-gnu*

2021-11-14 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21824 --- Comment #3 from Eric Gallager --- (In reply to Eric Gallager from comment #2) > (In reply to Alfred M. Szmidt from comment #1) > > Could someone go over these bugs and commit the pending patches? > > Only bug 21823 is left now. OK, that's

Re: [PATCH][_GLIBCXX_DEBUG] Code cleanup/simplification

2021-11-14 Thread Jonathan Wakely via Gcc-patches
On Sat, 13 Nov 2021 at 13:19, François Dumont via Libstdc++ wrote: > > libstdc++: [_GLIBCXX_DEBUG] Remove _Safe_container<>::_M_safe() > > Container code cleanup to get rid of _Safe_container<>::_M_safe() > and just > _Safe:: calls which use normal inheritance. Also remove several

[Bug tree-optimization/103215] [12 regression] gcc generates unexpected warnings on libx11-1.7.2: error: array subscript -2 is outside array bounds of since r12-3124-g820f0940d7ace130

2021-11-14 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103215 --- Comment #4 from Sergei Trofimovich --- Created attachment 51792 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51792=edit gdb-bug.cc Found similar bug in gdb/c++ at gdb/language.c. It might have slightly better loop structure. As a

[Bug tree-optimization/103237] New: wrong code with -ftree-vectorize at -O1 on x86_64-linux-gnu

2021-11-14 Thread haoxintu at gmail dot com via Gcc-bugs
ured with:../configure --prefix=/home/haoxin/haoxin-data/compilers/gcc/build/ --enable-bootstrap --enable-checking=release --enable-multilib --enable-languages=c,c++,lto --no-create --no-recursion Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 2024 (experime

Re: Basic kill analysis for modref

2021-11-14 Thread Jan Hubicka via Gcc-patches
> > > > I think you want get_addr_base_and_unit_offset here. All > > variable indexed addresses are in separate stmts. That also means > > you can eventually work with just byte sizes/offsets? > > Will do. The access range in modref summary is bit based (since we want > to disabiguate

[Bug c++/101853] [12 Regression] g++.dg/modules/xtreme-header-5_b.C ICE

2021-11-14 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101853 --- Comment #7 from Jonathan Wakely --- Nobody is maintaining the modules code right now. This was introduced by a libstdc++ change, but as far as I know the library code is correct and this is just a compiler bug that should get fixed in stage

[Bug fortran/102043] Wrong array types used for negative stride accesses

2021-11-14 Thread tkoenig at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102043 --- Comment #20 from Thomas Koenig --- (In reply to Mikael Morin from comment #19) > (In reply to Thomas Koenig from comment #15) > > One possibility would be to extend the patch Sandra posted at > >

[Bug tree-optimization/103235] [12 Regression] Recent change to atomics triggers ICE

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103235 Andrew Pinski changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug tree-optimization/103184] [12 Regression] ICE caused by r12-5102

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103184 Andrew Pinski changed: What|Removed |Added CC||law at gcc dot gnu.org --- Comment #5

[PATCH] libstdc++: Implement P1328 "Making std::type_info::operator== constexpr"

2021-11-14 Thread Jonathan Wakely via Gcc-patches
Not committed yet ... This feature is present in the C++23 draft. The ARM EABI requires that the type_info::operator== function can be defined out-of-line (and suggests that should be the default). With this patch, we fail to conform to that in C++23 mode. I think we might want to move the logic

  1   2   >