[Bug libstdc++/78713] [missed optimization] gcc doesn't use clobbers to optimize constructors
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78713 Marc Glisse changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=80335 --- Comment #5 from Marc Glisse --- This seems fixed in gcc-8?
[Bug libstdc++/91281] New: std::optional debug checks
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91281 Bug ID: 91281 Summary: std::optional debug checks Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: diagnostic, easyhack Severity: enhancement Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target Milestone: --- std::optional::operator* has a precondition _M_engaged, but it is not checked, even in debug mode. It seems like a cheap and easy test to add.
[Bug c++/91270] ice during GIMPLE pass: dce
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91270 Martin Liška changed: What|Removed |Added Priority|P3 |P1 Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2019-07-28 CC||marxin at gcc dot gnu.org Known to work||9.1.0 Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org Ever confirmed|0 |1 Known to fail||10.0 --- Comment #4 from Martin Liška --- It's mine. I'm working on a patch.
[Bug c++/91270] [10 Regression] ICE in verify_use at gcc/tree-ssa.c:883 since r273791
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91270 Martin Liška changed: What|Removed |Added Summary|ice during GIMPLE pass: dce |[10 Regression] ICE in ||verify_use at ||gcc/tree-ssa.c:883 since ||r273791 --- Comment #5 from Martin Liška --- I've got a patch candidate: diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index cf507fa0453..bdaad09ef35 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -1294,6 +1294,21 @@ eliminate_unnecessary_stmts (void) && !gimple_plf (def_stmt, STMT_NECESSARY)) gimple_set_plf (stmt, STMT_NECESSARY, false); } + + /* Delete operator has 2 arguments, where the second argument is +size of the deallocated memory. */ + if (is_gimple_call (stmt) + && gimple_call_operator_delete_p (as_a (stmt))) + { + tree ptr = gimple_call_arg (stmt, 1); + if (TREE_CODE (ptr) == SSA_NAME) + { + gimple *def_stmt = SSA_NAME_DEF_STMT (ptr); + if (!gimple_nop_p (def_stmt) + && !gimple_plf (def_stmt, STMT_NECESSARY)) + gimple_set_plf (stmt, STMT_NECESSARY, false); + } + } } /* If GSI is not necessary then remove it. */ I'll finish it tomorrow morning and send it to mailing list.
[Bug c++/91270] [10 Regression] ICE in verify_use at gcc/tree-ssa.c:883 since r273791
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91270 --- Comment #6 from Martin Liška --- (In reply to Martin Liška from comment #5) > I've got a patch candidate: > > diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c > index cf507fa0453..bdaad09ef35 100644 > --- a/gcc/tree-ssa-dce.c > +++ b/gcc/tree-ssa-dce.c > @@ -1294,6 +1294,21 @@ eliminate_unnecessary_stmts (void) > && !gimple_plf (def_stmt, STMT_NECESSARY)) > gimple_set_plf (stmt, STMT_NECESSARY, false); > } > + > + /* Delete operator has 2 arguments, where the second argument is > + size of the deallocated memory. */ > + if (is_gimple_call (stmt) > + && gimple_call_operator_delete_p (as_a (stmt))) > + { > + tree ptr = gimple_call_arg (stmt, 1); > + if (TREE_CODE (ptr) == SSA_NAME) > + { > + gimple *def_stmt = SSA_NAME_DEF_STMT (ptr); > + if (!gimple_nop_p (def_stmt) > + && !gimple_plf (def_stmt, STMT_NECESSARY)) > + gimple_set_plf (stmt, STMT_NECESSARY, false); > + } > + } > } > > /* If GSI is not necessary then remove it. */ > > I'll finish it tomorrow morning and send it to mailing list. This patch will be better: diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index cf507fa0453..04338a67181 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -1294,6 +1294,20 @@ eliminate_unnecessary_stmts (void) && !gimple_plf (def_stmt, STMT_NECESSARY)) gimple_set_plf (stmt, STMT_NECESSARY, false); } + + /* Some delete operators have 2 arguments, where the second argument is +size of the deallocated memory. */ + if (gimple_call_num_args (stmt) == 2) + { + tree ptr = gimple_call_arg (stmt, 1); + if (TREE_CODE (ptr) == SSA_NAME) + { + gimple *def_stmt = SSA_NAME_DEF_STMT (ptr); + if (!gimple_nop_p (def_stmt) + && !gimple_plf (def_stmt, STMT_NECESSARY)) + gimple_set_plf (stmt, STMT_NECESSARY, false); + } + } } /* If GSI is not necessary then remove it. */
[Bug ada/91266] [10 regression] acats cd2a31a fails for 32b hosts.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91266 --- Comment #1 from Iain Sandoe --- actually, the problem is also seen on 64b powerpc-linux-gnu LAST_UPDATED: Fri Jul 26 10:23:02 UTC 2019 (revision 273825) === acats tests === FAIL: cd2a31a Native configuration is powerpc64-unknown-linux-gnu
[Bug target/91050] -mdejagnu-cpu= does not affect the -m assembler option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91050 --- Comment #14 from Alan Modra --- Author: amodra Date: Sun Jul 28 09:26:13 2019 New Revision: 273853 URL: https://gcc.gnu.org/viewcvs?rev=273853&root=gcc&view=rev Log: [RS6000] Make assembler command line cpu match default for gcc When gcc is configured using --with-cpu=, the specified cpu effectively becomes a default -mcpu= passed to gcc. This then affects the cpu passed to gas via ASM_CPU_SPEC. If gcc is not configured using --with-cpu then the cpu passed to gas is that given by ASM_DEFAULT_SPEC, which currently does not match the default flags selected in default64.h. This patch makes ASM_DEFAULT_SPEC agree with TARGET_DEFAULT flags. rs6000/default64.h appears in three places in config.gcc, the first one immediately followed by rs6000/freebsd64.h in $tm_file, and the other two immediately followed by rs6000/linux64.h. To be able to define ASM_DEFAULT_SPEC in rs6000/default64.h we don't want to redefine in the other two files. rs6000/freebsd64.h is easy since that file is always preceded by rs6000/default64.h, but rs6000/linux64.h can appear without rs6000/default64.h (a powerpc*-linux config where the default is -m32). In that case we will have TARGET_DEFAULT flags of 0 (from rs6000/sysv4.h) and want to use -mppc without -m64 and -mppc64 with -m64. This can be done by using the rs6000/rtems.h ASM_DEFAULT_SPEC in rs6000/sysv4.h, a change that won't affect sysv4 configurations where -m64 is invalid. The patch also introduces ASM_DEFAULT_EXTRA for the altivec variant targets so as to enable -maltivec by default. PR target/91050 * config/rs6000/sysv4.h (ASM_DEFAULT_SPEC): Modify if -m64. * config/rs6000/default64.h (ASM_DEFAULT_SPEC): Define. * config/rs6000/freebsd64.h (ASM_DEFAULT_SPEC): Don't define. * config/rs6000/linux64.h (ASM_DEFAULT_SPEC): Likewise. * config/rs6000/rtems.h (ASM_DEFAULT_SPEC): Likewise. * config/rs6000/rs6000.h (ASM_DEFAULT_EXTRA): Define and use in asm_default spec. * config/rs6000/eabialtivec.h (ASM_DEFAULT_EXTRA): Redefine. * config/rs6000/linuxaltivec.h (ASM_DEFAULT_EXTRA): Redefine. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/default64.h trunk/gcc/config/rs6000/eabialtivec.h trunk/gcc/config/rs6000/freebsd64.h trunk/gcc/config/rs6000/linux64.h trunk/gcc/config/rs6000/linuxaltivec.h trunk/gcc/config/rs6000/rs6000.h trunk/gcc/config/rs6000/rtems.h trunk/gcc/config/rs6000/sysv4.h
[Bug target/91135] [9/10 Regression] __linux__ not defined with -mcall-aixdesc on 9.x and ppc64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91135 --- Comment #10 from Alan Modra --- Author: amodra Date: Sun Jul 28 09:29:11 2019 New Revision: 273854 URL: https://gcc.gnu.org/viewcvs?rev=273854&root=gcc&view=rev Log: [RS6000] PR91135, __linux__ not defined with -mcall-aixdesc on 9.x and ppc64 This patch makes the obvious fix for PR91135, and deletes extraneous copies of GNU_USER_TARGET_D_OS_VERSIONS that appear in rs6000/linux.h and rs6000/linux64.h. Since all configurations using either of these files also include linux.h there is no need to duplicate the macro. PR target/91135 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Don't define. * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Invoke GNU_USER_TARGET_OS_CPP_BUILTINS for aixdesc abi. (GNU_USER_TARGET_D_OS_VERSIONS): Don't define. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/linux.h trunk/gcc/config/rs6000/linux64.h
[Bug middle-end/91282] New: gcc.dg/type-convert-var.c FAILs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91282 Bug ID: 91282 Summary: gcc.dg/type-convert-var.c FAILs Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org CC: tnfchris at gcc dot gnu.org Target Milestone: --- Target: i?86-*-*, x86_64-*-*, m68k-*-*, s390x-*-* The new gcc.dg/type-convert-var.c test FAILs on 32-bit x86 (seen on Solaris/x86), with reports on m68k and s390x, too: +FAIL: gcc.dg/type-convert-var.c scan-tree-dump-not optimized "double"
[Bug middle-end/91282] gcc.dg/type-convert-var.c FAILs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91282 Rainer Orth changed: What|Removed |Added Target Milestone|--- |10.0
[Bug middle-end/91283] New: [10 regression] gcc.dg/torture/c99-contract-1.c FAILs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91283 Bug ID: 91283 Summary: [10 regression] gcc.dg/torture/c99-contract-1.c FAILs Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org Target Milestone: --- Target: i386-pc-solaris2.11, i686-pc-linux-gnu, mips64el-unknown-linux-gnu Between 20190726 (r273825) and 20190728 (r273850), gcc.dg/torture/c99-contract-1.c started to FAIL on 32-bit x86 and mips: +FAIL: gcc.dg/torture/c99-contract-1.c -O2 -flto execution test +FAIL: gcc.dg/torture/c99-contract-1.c -O2 -flto -flto-partition=none execution test Thread 2 received signal SIGABRT, Aborted. [Switching to Thread 1 (LWP 1)] 0xfdbef7d5 in __lwp_sigqueue () from /lib/libc.so.1 (gdb) where #0 0xfdbef7d5 in __lwp_sigqueue () from /lib/libc.so.1 #1 0xfdbe80af in thr_kill () from /lib/libc.so.1 #2 0xfdb2986a in raise () from /lib/libc.so.1 #3 0xfdafb84e in abort () from /lib/libc.so.1 #4 0x08050c74 in main () at /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/torture/c99-contract-1.c:21 This is most likely another fallout from 2019-07-26 Tamar Christina * convert.c (convert_to_real_1): Move part of conversion code... * match.pd: ...To here.
[Bug middle-end/91283] [10 regression] gcc.dg/torture/c99-contract-1.c FAILs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91283 Rainer Orth changed: What|Removed |Added Target Milestone|--- |10.0
[Bug ada/91266] [10 regression] acats cd2a31a fails for 32b hosts.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91266 Eric Botcazou changed: What|Removed |Added Status|NEW |RESOLVED CC||ebotcazou at gcc dot gnu.org Resolution|--- |DUPLICATE --- Comment #2 from Eric Botcazou --- . *** This bug has been marked as a duplicate of bug 91169 ***
[Bug ada/91169] [10 regression] cd2a31a FAILs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91169 Eric Botcazou changed: What|Removed |Added CC||iains at gcc dot gnu.org --- Comment #3 from Eric Botcazou --- *** Bug 91266 has been marked as a duplicate of this bug. ***
[Bug c++/91270] [10 Regression] ICE in verify_use at gcc/tree-ssa.c:883 since r273791
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91270 Martin Liška changed: What|Removed |Added Keywords||patch --- Comment #7 from Martin Liška --- Patch has been just sent: https://gcc.gnu.org/ml/gcc-patches/2019-07/msg01708.html
[Bug ipa/89330] IPA inliner touches released cgraph_edges
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89330 Martin Liška changed: What|Removed |Added Assignee|jamborm at gcc dot gnu.org |marxin at gcc dot gnu.org --- Comment #15 from Martin Liška --- I'll take the issue as Martin installed the patch. I'm testing right now the patch that releases deleted edges.
[Bug middle-end/91267] [10 regression] SEGV in value_range_base::equal_p
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91267 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2019-07-28 CC||jakub at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #7 from Jakub Jelinek --- Slightly cleaned up testcase for -O3: void bar (void); void baz (int); char *qux (void); int a, b; void foo (int f, char *d) { char *e; while (d) { if (f) if (e) bar (); baz (e - (d + a)); b = e - d; d = qux (); } } Indeed, started with r273792.
[Bug middle-end/91267] [10 regression] SEGV in value_range_base::equal_p
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91267 --- Comment #8 from Jakub Jelinek --- The problem is in the - old_vr = get_value_range (var); + old_vr = get_lattice_entry (var); change because get_value_range used to return the address of the const varying constant, but get_lattice_entry returns NULL if SSA_NAME_VERSION (var) >= num_vr_values, and invoking !old_vr->equal_p (*new_vr, /*ignore_equivs=*/false); on NULL old_vr is UB which ICEs. The question is if we should just return false if old_vr is NULL, or if we should check that case in the callers or their callers and don't even call say record_ranges_from_stmt for setters of newly added SSA_NAMEs.
[Bug target/91269] sparc64-gcc fails to build glibc (-fcall-used-g6) on niagara4: Assembler messages: Error: Illegal operands
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91269 --- Comment #8 from Sergei Trofimovich --- Extra info: -fPIE is also needed to reproduce on on vanilla gcc from git. Thus the reproducer is: $ gcc/xgcc -Bgcc -O2 -fcall-used-g6 -fPIE -mcpu=niagara4 -c bug.c -o bug.o bug.c: In function 'c': bug.c:13:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 13 | cp = b[k]; |^ /tmp/ccaJlRBg.s: Assembler messages: /tmp/ccaJlRBg.s:145: Error: Illegal operands $ gcc/xgcc -Bgcc -v Reading specs from gcc/specs COLLECT_GCC=gcc/xgcc COLLECT_LTO_WRAPPER=gcc/lto-wrapper Target: sparc64-unknown-linux-gnu Configured with: ../gcc/configure --target=sparc64-unknown-linux-gnu --with-sysroot=/usr/sparc64-unknown-linux-gnu --enable-languages=c --disable-bootstrap --prefix=/home/slyfox/dev/git/gcc-sparc64/../gcc-sparc64-installed --disable-multilib cross_compiling=yes Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.0.0 20190728 (experimental) (GCC)
[Bug ipa/89330] IPA inliner touches released cgraph_edges
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89330 --- Comment #16 from Martin Liška --- Author: marxin Date: Sun Jul 28 17:10:26 2019 New Revision: 273857 URL: https://gcc.gnu.org/viewcvs?rev=273857&root=gcc&view=rev Log: Release cgraph_{node,edge} via ggc_free (PR ipa/89330). 2019-07-28 Martin Liska PR ipa/89330 * cgraph.c (symbol_table::create_edge): Always allocate a cgraph_edge. (symbol_table::free_edge): Store summary_id to edge_released_summary_ids if != -1; * cgraph.h (NEXT_FREE_NODE): Remove. (SET_NEXT_FREE_NODE): Likewise. (NEXT_FREE_EDGE): Likewise. (symbol_table::release_symbol): Store summary_id to cgraph_released_summary_ids if != -1; (symbol_table::allocate_cgraph_symbol): Always allocate a cgraph_node. Modified: trunk/gcc/ChangeLog trunk/gcc/cgraph.c trunk/gcc/cgraph.h
[Bug ipa/89330] IPA inliner touches released cgraph_edges
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89330 Martin Liška changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #17 from Martin Liška --- Should be fixed now.
[Bug fortran/88227] ICE in gfc_convert_boz, at fortran/target-memory.c:788
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88227 --- Comment #10 from kargl at gcc dot gnu.org --- Patch submitted at https://gcc.gnu.org/ml/fortran/2019-07/msg00078.html Please test.
[gcc 10-20190728] internal compiler error: in speculative_call_info, at cgraph.c:1114
Hi, While compiling gcc-10-20190728 snapshot: src/gcc-10-20190728/gcc/tree-ssa-sccvn.c:7323:1: internal compiler error: in speculative_call_info, at cgraph.c:1114 7323 | } | ^ 0x5d34b9 cgraph_edge::speculative_call_info(cgraph_edge*&, cgraph_edge*&, ipa_ref*&) /home/ss/gcc10/src/gcc-10-20190728/gcc/cgraph.c:1114 0x84121c cgraph_edge::resolve_speculation(tree_node*) /home/ss/gcc10/src/gcc-10-20190728/gcc/cgraph.c:1155 0x841620 cgraph_edge::make_direct(cgraph_node*) /home/ss/gcc10/src/gcc-10-20190728/gcc/cgraph.c:1215 0xa1248e ipa_make_edge_direct_to_target(cgraph_edge*, tree_node*, bool) /home/ss/gcc10/src/gcc-10-20190728/gcc/ipa-prop.c:2978 0x13a2ee9 ipcp_discover_new_direct_edges /home/ss/gcc10/src/gcc-10-20190728/gcc/ipa-cp.c:3347 0x13a2ee9 create_specialized_node /home/ss/gcc10/src/gcc-10-20190728/gcc/ipa-cp.c:3913 0x13abf99 decide_whether_version_node /home/ss/gcc10/src/gcc-10-20190728/gcc/ipa-cp.c:4803 0x13abf99 ipcp_decision_stage /home/ss/gcc10/src/gcc-10-20190728/gcc/ipa-cp.c:4915 0x13abf99 ipcp_driver /home/ss/gcc10/src/gcc-10-20190728/gcc/ipa-cp.c:5092 0x13abf99 execute /home/ss/gcc10/src/gcc-10-20190728/gcc/ipa-cp.c:5183 -ss