[Bug tree-optimization/107269] New: wrong code at -O1 and above with "-fno-tree-ccp" on x86_64-linux-gnu

2022-10-14 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
l/software/local/gcc-trunk --enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib --with-system-zlib Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.0 20221014 (experimental) [master r13-3307-g8efc38347a7] (GCC) [594] % [594] % gcctk -O1 small.

[Bug tree-optimization/107269] wrong code at -O1 and above with "-fno-tree-ccp" on x86_64-linux-gnu

2022-10-14 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
: zlib gcc version 13.0.0 20221014 (experimental) [master r13-3307-g8efc38347a7] (GCC) [538] % [538] % gcctk -O1 small.c; ./a.out [539] % [539] % gcctk -O1 -fno-tree-ccp small.c [540] % timeout -s 9 5 ./a.out Killed [541] % [541] % cat small.c int a, c, d; unsigned b; int main() { int f = 1

[Bug fortran/107266] Reject kind=4 characters for BIND(C) – it invalid and generates wrong code

2022-10-14 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107266 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org ---

[Bug fortran/107266] Reject kind=4 characters for BIND(C) – it invalid and generates wrong code

2022-10-14 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107266 --- Comment #3 from kargl at gcc dot gnu.org --- (In reply to kargl from comment #2) > (In reply to Tobias Burnus from comment #1) > > Better example: > > > > character(kind=4) function f(x) bind(C) > > character(kind=4), value :: x > > end >

[Bug fortran/107266] Reject kind=4 characters for BIND(C) – it invalid and generates wrong code

2022-10-14 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107266 kargl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4

[Bug fortran/93483] ICE in gfc_constructor_copy, at fortran/constructor.c:103

2022-10-14 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93483 --- Comment #17 from Mikael Morin --- There is the possibility to bail out at the very point where things are about to go wrong, and hope that at resolution time simplification will happen. Like this for the first part of the test from the patch:

[Bug fortran/93483] ICE in gfc_constructor_copy, at fortran/constructor.c:103

2022-10-14 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93483 --- Comment #18 from Mikael Morin --- (In reply to Mikael Morin from comment #17) > And something similar for the rest of the test (the binary operators). Like this: diff --git a/gcc/fortran/arith.cc b/gcc/fortran/arith.cc index 5e96bb9658e..3f

[Bug fortran/93483] ICE in gfc_constructor_copy, at fortran/constructor.c:103

2022-10-14 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93483 --- Comment #19 from Mikael Morin --- (In reply to Mikael Morin from comment #18) > (In reply to Mikael Morin from comment #17) > > And something similar for the rest of the test (the binary operators). > > Like this: > It doesn't work unfortun

[Bug fortran/93483] ICE in gfc_constructor_copy, at fortran/constructor.c:103

2022-10-14 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93483 --- Comment #20 from Mikael Morin --- (In reply to Mikael Morin from comment #19) > (In reply to Mikael Morin from comment #18) > > (In reply to Mikael Morin from comment #17) > > > And something similar for the rest of the test (the binary opera

[Bug fortran/93483] ICE in gfc_constructor_copy, at fortran/constructor.c:103

2022-10-14 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93483 --- Comment #21 from anlauf at gcc dot gnu.org --- (In reply to Mikael Morin from comment #17) > Like this for the first part of the test from the patch: > > diff --git a/gcc/fortran/arith.cc b/gcc/fortran/arith.cc > index 9e079e42995..5e96bb9658

[Bug c++/107242] ICE: tree check: expected complex_cst, have plus_expr in output_constant, at varasm.cc:5284 with frounding-math

2022-10-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107242 --- Comment #6 from Andrew Pinski --- (In reply to Richard Biener from comment #5) > I think that either the C++ frontend needs to reject this code or we need to > ignore -frounding-math in constant folding this (I think we do that > elsewhere).

[Bug fortran/107266] Reject kind=4 characters for BIND(C) – it invalid and generates wrong code

2022-10-14 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107266 kargl at gcc dot gnu.org changed: What|Removed |Added Last reconfirmed||2022-10-14 Status

[Bug fortran/93483] ICE in gfc_constructor_copy, at fortran/constructor.c:103

2022-10-14 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93483 --- Comment #22 from anlauf at gcc dot gnu.org --- (In reply to Mikael Morin from comment #11) > Here is an example, where the array simplifies using the host-associated > parameter value instead of calling the contained function with the same nam

[Bug fortran/100971] ICE: Bad IO basetype (7)

2022-10-14 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100971 --- Comment #5 from CVS Commits --- The master branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:89f20c9ae4641f9b2e87e47f7dab3dc197faa0aa commit r13-3309-g89f20c9ae4641f9b2e87e47f7dab3dc197faa0aa Author: Harald Anlauf Date: S

[Bug fortran/100971] ICE: Bad IO basetype (7)

2022-10-14 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100971 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Target Milestone|

[Bug fortran/93483] ICE in gfc_constructor_copy, at fortran/constructor.c:103

2022-10-14 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93483 --- Comment #23 from anlauf at gcc dot gnu.org --- Created attachment 53706 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53706&action=edit Updated patch Here's a patch that incorporates comment#17 and comment#20 and adds a testcase for co

[Bug fortran/107266] Reject kind=4 characters for BIND(C) – it invalid and generates wrong code

2022-10-14 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107266 --- Comment #5 from Tobias Burnus --- I do note that we already have bind(C) + kind=4 examples: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/testsuite/gfortran.dg/PR100906.f90 integer, parameter :: c_ucs4_char = 4 and more. => Keep permitt

[Bug fortran/107266] Reject kind=4 characters for BIND(C) – it invalid and generates wrong code

2022-10-14 Thread sgk at troutmask dot apl.washington.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107266 --- Comment #6 from Steve Kargl --- On Fri, Oct 14, 2022 at 09:36:59PM +, burnus at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107266 > > --- Comment #5 from Tobias Burnus --- > I do note that we already have bin

[Bug fortran/107266] Reject kind=4 characters for BIND(C) – it invalid and generates wrong code

2022-10-14 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107266 --- Comment #7 from kargl at gcc dot gnu.org --- Here's the updated patch. It will accept the code as before if -std= is absent or -std=GNU. For other -std= flags such as -std=f2018, one will get % gfcx -c -std=f2018 a.f90 a.f90:1:31: 1

[Bug rtl-optimization/107270] New: [10/11/12/13 Regression] return for structure is not as good as before

2022-10-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107270 Bug ID: 107270 Summary: [10/11/12/13 Regression] return for structure is not as good as before Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: missed-

[Bug rtl-optimization/107270] [10/11/12/13 Regression] return for structure is not as good as before

2022-10-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107270 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |10.5 Known to work|

<    1   2