public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/101102] New: ICE in propagate_necessity, at tree-ssa-dce.c:980
@ 2021-06-16 17:24 gscfq@t-online.de
  2021-06-17  6:40 ` [Bug fortran/101102] " rguenth at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: gscfq@t-online.de @ 2021-06-16 17:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101102

            Bug ID: 101102
           Summary: ICE in propagate_necessity, at tree-ssa-dce.c:980
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to at least r5 :


$ cat z1.f90
program p
   type t
      real :: a
   end type
   type(t) :: x[*]
   data x /t(2.0+a)/
   dimension :: a(2)
end


$ gfortran-12-20210613 -c z1.f90 -fcoarray=single
z1.f90:6:13:

    6 |    data x /t(2.0+a)/
      |             1
Error: non-constant initialization expression at (1)


$ gfortran-12-20210613 -c z1.f90 -fcoarray=lib -O1
during GIMPLE pass: cddce
z1.f90:8:3:

    8 | end
      |   ^
internal compiler error: in propagate_necessity, at tree-ssa-dce.c:980
0xd7022b propagate_necessity
        ../../gcc/tree-ssa-dce.c:980
0xd71056 perform_tree_ssa_dce
        ../../gcc/tree-ssa-dce.c:1673
0xd72475 tree_ssa_cd_dce
        ../../gcc/tree-ssa-dce.c:1717
0xd72475 execute
        ../../gcc/tree-ssa-dce.c:1789

---

z1.f90:1:9:

    1 | program p
      |         ^
Error: type mismatch in binary expression
real(kind=4)

real(kind=4)[2]

real(kind=4)

_5 = a + 2.0e+0;
z1.f90:1:9: internal compiler error: 'verify_gimple' failed
0xe64aad verify_gimple_in_seq(gimple*)
        ../../gcc/tree-cfg.c:5161
0xb1f5d1 gimplify_body(tree_node*, bool)
        ../../gcc/gimplify.c:15407
0xb1f877 gimplify_function_tree(tree_node*)
        ../../gcc/gimplify.c:15478
0xedd360 gimplify_all_functions
        ../../gcc/tree-nested.c:3672
0xedd34f gimplify_all_functions
        ../../gcc/tree-nested.c:3676
0xee56c0 lower_nested_functions(tree_node*)
        ../../gcc/tree-nested.c:3693
0x94df9a cgraph_node::analyze()
        ../../gcc/cgraphunit.c:676
0x951436 analyze_functions
        ../../gcc/cgraphunit.c:1234
0x95262d symbol_table::finalize_compilation_unit()
        ../../gcc/cgraphunit.c:2508

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/101102] ICE in propagate_necessity, at tree-ssa-dce.c:980
  2021-06-16 17:24 [Bug fortran/101102] New: ICE in propagate_necessity, at tree-ssa-dce.c:980 gscfq@t-online.de
@ 2021-06-17  6:40 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-17  6:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101102

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-06-17
           Keywords|                            |wrong-code

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
> ./f951 -quiet t.f90 -fcoarray=lib   
t.f90:1:9:

    1 | program p
      |         ^
Error: type mismatch in binary expression
real(kind=4)

real(kind=4)[2]

real(kind=4)

_5 = a + 2.0e+0;
t.f90:1:9: internal compiler error: 'verify_gimple' failed
0x1457e27 verify_gimple_in_seq(gimple*)
        /home/rguenther/src/gcc2/gcc/tree-cfg.c:5161
0x1018cb7 gimplify_body(tree_node*, bool)
        /home/rguenther/src/gcc2/gcc/gimplify.c:15407
0x1018f51 gimplify_function_tree(tree_node*)
        /home/rguenther/src/gcc2/gcc/gimplify.c:15478
0x14f6031 gimplify_all_functions
        /home/rguenther/src/gcc2/gcc/tree-nested.c:3672

so the fortran FE emits an add of real(2) and real.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-17  6:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 17:24 [Bug fortran/101102] New: ICE in propagate_necessity, at tree-ssa-dce.c:980 gscfq@t-online.de
2021-06-17  6:40 ` [Bug fortran/101102] " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).