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
* [Bug fortran/66380] ICE for intrinsic reshape with insufficient number of array elements 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 ` kargl at gcc dot gnu.org 2015-06-02 17:31 ` sgk at troutmask dot apl.washington.edu ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: kargl at gcc dot gnu.org @ 2015-06-02 17:28 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66380 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org --- Created attachment 35681 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35681&action=edit patch to fix ICE ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/66380] ICE for intrinsic reshape with insufficient number of array elements 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 3 siblings, 0 replies; 5+ messages in thread From: sgk at troutmask dot apl.washington.edu @ 2015-06-02 17:31 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66380 --- Comment #2 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- The problem is that an assertion is triggered for a PAD size that is less than or equal to zero. The assertion should be an error condition. The patch that I attached does this. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/66380] ICE for intrinsic reshape with insufficient number of array elements 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 3 siblings, 0 replies; 5+ messages in thread From: kargl at gcc dot gnu.org @ 2015-06-02 23:02 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66380 --- Comment #3 from kargl at gcc dot gnu.org --- Author: kargl Date: Tue Jun 2 23:02:05 2015 New Revision: 224049 URL: https://gcc.gnu.org/viewcvs?rev=224049&root=gcc&view=rev Log: 2015-06-02 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/66380 * simplify.c (gfc_simplify_reshape): Convert assert into returning NULL, which triggers an error condition. 2015-06-02 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/66380 * gfortran.dg/reshape_7.f90: New test. Added: branches/gcc-5-branch/gcc/testsuite/gfortran.dg/reshape_7.f90 Modified: branches/gcc-5-branch/gcc/fortran/ChangeLog branches/gcc-5-branch/gcc/fortran/simplify.c branches/gcc-5-branch/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/66380] ICE for intrinsic reshape with insufficient number of array elements 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 ` (2 preceding siblings ...) 2015-06-02 23:02 ` kargl at gcc dot gnu.org @ 2015-06-02 23:39 ` kargl at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: kargl at gcc dot gnu.org @ 2015-06-02 23:39 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66380 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #4 from kargl at gcc dot gnu.org --- Fixed on trunk and 5-branch. Thanks for the bug report. ^ 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).