public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/66380] New: ICE for intrinsic reshape with insufficient number of array elements
@ 2015-06-02 14:26 gerhard.steinmetz.fortran@t-online.de
  2015-06-02 17:28 ` [Bug fortran/66380] " kargl at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-06-02 14:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66380
           Summary: ICE for intrinsic reshape with insufficient number of
                    array elements
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

This code with less array elements than requested via shape sh :

   program p
      integer, parameter :: sh(2) = [2, 3]
      integer, parameter :: a(2,2) = reshape([1, 2, 3, 4], sh)
      print *, a
   end

yields :
f951: internal compiler error: in gfc_simplify_reshape, at
fortran/simplify.c:5177

---

Whereas this version :

   program p
      integer, parameter :: sh(2) = [2, 1]
      integer, parameter :: a(2,2) = reshape([1, 2, 3, 4], sh)
      print *, a
   end

flags an error :

    integer, parameter :: a(2,2) = reshape([1, 2, 3, 4], sh)
                               1
Error: Different shape for array assignment at (1) on dimension 2 (2 and 1)


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

end of thread, other threads:[~2015-06-02 23:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-02 14:26 [Bug fortran/66380] New: ICE for intrinsic reshape with insufficient number of array elements gerhard.steinmetz.fortran@t-online.de
2015-06-02 17:28 ` [Bug fortran/66380] " kargl at gcc dot gnu.org
2015-06-02 17:31 ` sgk at troutmask dot apl.washington.edu
2015-06-02 23:02 ` kargl at gcc dot gnu.org
2015-06-02 23:39 ` kargl 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).