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

* [Bug fortran/57959] [F03] ICE with structure constructor with scalar allocatable components
  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 ` janus at gcc dot gnu.org
  2014-01-10 14:10 ` janus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: janus at gcc dot gnu.org @ 2013-08-06  8:45 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-08-06
                 CC|                            |janus at gcc dot gnu.org
            Summary|ICE with structure          |[F03] ICE with structure
                   |constructor with scalar     |constructor with scalar
                   |allocatable components      |allocatable components
     Ever confirmed|0                           |1

--- Comment #2 from janus at gcc dot gnu.org ---
Loosely related: PR 49213.


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

* [Bug fortran/57959] [F03] ICE with structure constructor with scalar allocatable components
  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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-10 14:10 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #3 from janus at gcc dot gnu.org ---
obviously a duplicate

*** This bug has been marked as a duplicate of bug 55932 ***


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

* [Bug fortran/57959] [F03] ICE with structure constructor with scalar allocatable components
  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
  4 siblings, 0 replies; 6+ messages in thread
From: paul.richard.thomas at gmail dot com @ 2015-01-18 15:35 UTC (permalink / raw)
  To: gcc-bugs

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

paul.richard.thomas at gmail dot com <paul.richard.thomas at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paul.richard.thomas at gmail dot c
                   |                            |om

--- Comment #4 from paul.richard.thomas at gmail dot com <paul.richard.thomas at gmail dot com> ---
Created attachment 34475
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34475&action=edit
Fix for the PR

Bootstraps and regtests on x86_64/FC21

2015-01-18  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/64578
    * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
    for allocatable components, where the source is a variable.

2015-01-18  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/64578
    * gfortran.dg/block_13.f08: New test


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

* [Bug fortran/57959] [F03] ICE with structure constructor with scalar allocatable components
  2013-07-23  8:03 [Bug fortran/57959] New: ICE with structure constructor with scalar allocatable components burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 6+ messages in thread
From: paul.richard.thomas at gmail dot com @ 2015-01-18 16:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from paul.richard.thomas at gmail dot com <paul.richard.thomas at gmail dot com> ---
The incorrect PR numbers in the Change Logs have been corrected.


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

* [Bug fortran/57959] [F03] ICE with structure constructor with scalar allocatable components
  2013-07-23  8:03 [Bug fortran/57959] New: ICE with structure constructor with scalar allocatable components burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-01-18 16:05 ` paul.richard.thomas at gmail dot com
@ 2015-01-18 16:09 ` paul.richard.thomas at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paul.richard.thomas at gmail dot com @ 2015-01-18 16:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from paul.richard.thomas at gmail dot com <paul.richard.thomas at gmail dot com> ---
Committed to trunk as revision 219818. Change logs correct in 219819.

Sorry for the mess.

Paul


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