public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/57959] New: ICE with structure constructor with scalar allocatable components
@ 2013-07-23  8:03 burnus at gcc dot gnu.org
  2013-08-06  8:45 ` [Bug fortran/57959] [F03] " janus at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-07-23  8:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57959

            Bug ID: 57959
           Summary: ICE with structure constructor with scalar allocatable
                    components
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org

Based on the array example in PR57957, which compiles. The following:

  type :: type1
    real, allocatable :: anum
  end type type1

  ... = type1(5.0)

fails with:
0x7b3b5d fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc/fold-const.c:1952
0x5fb036 gfc_trans_scalar_assign(gfc_se*, gfc_se*, gfc_typespec, bool, bool,
bool)
        ../../gcc/fortran/trans-expr.c:6899


Full example:

program main
  implicit none
  type :: type1
    real, allocatable :: anum
  end type type1

  type :: type2
    type(type1) :: temp
  end type type2
block
  type(type1) :: uKnot
  type(type2) :: a

  uKnot = type1(5.0)
  a = type2(uKnot)
end block
end


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

end of thread, other threads:[~2015-01-18 16:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-23  8:03 [Bug fortran/57959] New: ICE with structure constructor with scalar allocatable components burnus at gcc dot gnu.org
2013-08-06  8:45 ` [Bug fortran/57959] [F03] " janus at gcc dot gnu.org
2014-01-10 14:10 ` janus at gcc dot gnu.org
2015-01-18 15:35 ` paul.richard.thomas at gmail dot com
2015-01-18 16:05 ` paul.richard.thomas at gmail dot com
2015-01-18 16:09 ` paul.richard.thomas at gmail dot com

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).