public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/25597]  New: [ICE] in fold_binary, at fold-const.c:7198
@ 2005-12-29 18:01 krange at lhup dot edu
  2005-12-29 18:02 ` [Bug fortran/25597] " krange at lhup dot edu
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: krange at lhup dot edu @ 2005-12-29 18:01 UTC (permalink / raw)
  To: gcc-bugs

rangek@krange:~/UMN_Projects/Software/Libraries/YorkLib_test> gfortran20051228
-v -save-temps -c -g bug.f95
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --program-suffix=20051228
--enable-languages=fortran
Thread model: posix
gcc version 4.2.0 20051228 (experimental)
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/f951 bug.f95 -quiet
-dumpbase bug.f95 -mtune=k8 -auxbase bug -g -version -o bug.s
GNU F95 version 4.2.0 20051228 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.2.0 20051228 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
bug.f95: In function ‘reallocate_hnv’:
bug.f95:281: internal compiler error: in fold_binary, at fold-const.c:7198


-- 
           Summary: [ICE] in fold_binary, at fold-const.c:7198
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: krange at lhup dot edu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug fortran/25597] [ICE] in fold_binary, at fold-const.c:7198
  2005-12-29 18:01 [Bug fortran/25597] New: [ICE] in fold_binary, at fold-const.c:7198 krange at lhup dot edu
@ 2005-12-29 18:02 ` krange at lhup dot edu
  2005-12-29 18:13 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: krange at lhup dot edu @ 2005-12-29 18:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from krange at lhup dot edu  2005-12-29 18:02 -------
Created an attachment (id=10565)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10565&action=view)
self contained (but probably not minimal) source that triggers ICE


-- 


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


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

* [Bug fortran/25597] [ICE] in fold_binary, at fold-const.c:7198
  2005-12-29 18:01 [Bug fortran/25597] New: [ICE] in fold_binary, at fold-const.c:7198 krange at lhup dot edu
  2005-12-29 18:02 ` [Bug fortran/25597] " krange at lhup dot edu
@ 2005-12-29 18:13 ` pinskia at gcc dot gnu dot org
  2005-12-29 18:21 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-29 18:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-12-29 18:13 -------
Reduced testcase:
  FUNCTION reallocate_hnv(p,n,LEN)
    CHARACTER(LEN=LEN), DIMENSION(:), POINTER :: reallocate_hnv
    ALLOCATE(reallocate_hnv(n),stat=ierr)
  END FUNCTION reallocate_hnv


-- 


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


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

* [Bug fortran/25597] [ICE] in fold_binary, at fold-const.c:7198
  2005-12-29 18:01 [Bug fortran/25597] New: [ICE] in fold_binary, at fold-const.c:7198 krange at lhup dot edu
  2005-12-29 18:02 ` [Bug fortran/25597] " krange at lhup dot edu
  2005-12-29 18:13 ` pinskia at gcc dot gnu dot org
@ 2005-12-29 18:21 ` pinskia at gcc dot gnu dot org
  2006-01-01  6:09 ` [Bug fortran/25597] ICE with allocate on the return value of a function, character with a len of an argument pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-29 18:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2005-12-29 18:21 -------
Confirmed, not a regression.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-29 18:21:19
               date|                            |


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


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

* [Bug fortran/25597] ICE with allocate on the return value of a function, character with a len of an argument
  2005-12-29 18:01 [Bug fortran/25597] New: [ICE] in fold_binary, at fold-const.c:7198 krange at lhup dot edu
                   ` (2 preceding siblings ...)
  2005-12-29 18:21 ` pinskia at gcc dot gnu dot org
@ 2006-01-01  6:09 ` pinskia at gcc dot gnu dot org
  2006-01-01  6:27 ` [Bug fortran/25597] ICE with allocate on the return value of a function, character array " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-01  6:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-01-01 06:09 -------
A little further reduced:
FUNCTION reallocate_hnv(p,n,LEN)
  CHARACTER(LEN=LEN),  POINTER :: reallocate_hnv
   ALLOCATE(reallocate_hnv)
END FUNCTION reallocate_hnv


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
OtherBugsDependingO|                            |19276
              nThis|                            |
            Summary|[ICE] in fold_binary, at    |ICE with allocate on the
                   |fold-const.c:7198           |return value of a function,
                   |                            |character with a len of an
                   |                            |argument


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



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

* [Bug fortran/25597] ICE with allocate on the return value of a function, character array with a len of an argument
  2005-12-29 18:01 [Bug fortran/25597] New: [ICE] in fold_binary, at fold-const.c:7198 krange at lhup dot edu
                   ` (3 preceding siblings ...)
  2006-01-01  6:09 ` [Bug fortran/25597] ICE with allocate on the return value of a function, character with a len of an argument pinskia at gcc dot gnu dot org
@ 2006-01-01  6:27 ` pinskia at gcc dot gnu dot org
  2006-04-10 14:35 ` paul dot richard dot thomas at cea dot fr
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-01  6:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-01-01 06:27 -------
(In reply to comment #4)
> A little further reduced:

Actually that is a different bug.

Anyways the reduced testcase looks like:
  FUNCTION reallocate_hnv(p,n,LEN)
    CHARACTER(LEN=LEN), DIMENSION(:), POINTER :: reallocate_hnv
    ALLOCATE(reallocate_hnv(n))
  END FUNCTION reallocate_hnv


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE with allocate on the    |ICE with allocate on the
                   |return value of a function, |return value of a function,
                   |character with a len of an  |character array with a len
                   |argument                    |of an argument


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



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

* [Bug fortran/25597] ICE with allocate on the return value of a function, character array with a len of an argument
  2005-12-29 18:01 [Bug fortran/25597] New: [ICE] in fold_binary, at fold-const.c:7198 krange at lhup dot edu
                   ` (4 preceding siblings ...)
  2006-01-01  6:27 ` [Bug fortran/25597] ICE with allocate on the return value of a function, character array " pinskia at gcc dot gnu dot org
@ 2006-04-10 14:35 ` paul dot richard dot thomas at cea dot fr
  2006-04-12 19:28 ` patchapp at dberlin dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2006-04-10 14:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from paul dot richard dot thomas at cea dot fr  2006-04-10 14:35 -------
(In reply to comment #5)
> (In reply to comment #4)
> > A little further reduced:
> Actually that is a different bug.
> Anyways the reduced testcase looks like:
>   FUNCTION reallocate_hnv(p,n,LEN)
>     CHARACTER(LEN=LEN), DIMENSION(:), POINTER :: reallocate_hnv
>     ALLOCATE(reallocate_hnv(n))
>   END FUNCTION reallocate_hnv

This no longer ICEs but does bomn out in runtime, as described in PR27096

Paul


-- 


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


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

* [Bug fortran/25597] ICE with allocate on the return value of a function, character array with a len of an argument
  2005-12-29 18:01 [Bug fortran/25597] New: [ICE] in fold_binary, at fold-const.c:7198 krange at lhup dot edu
                   ` (5 preceding siblings ...)
  2006-04-10 14:35 ` paul dot richard dot thomas at cea dot fr
@ 2006-04-12 19:28 ` patchapp at dberlin dot org
  2006-04-16  3:45 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: patchapp at dberlin dot org @ 2006-04-12 19:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from patchapp at dberlin dot org  2006-04-12 19:28 -------
Subject: Bug number PR25597

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-04/msg00350.html


-- 


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


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

* [Bug fortran/25597] ICE with allocate on the return value of a function, character array with a len of an argument
  2005-12-29 18:01 [Bug fortran/25597] New: [ICE] in fold_binary, at fold-const.c:7198 krange at lhup dot edu
                   ` (6 preceding siblings ...)
  2006-04-12 19:28 ` patchapp at dberlin dot org
@ 2006-04-16  3:45 ` pault at gcc dot gnu dot org
  2006-04-23  5:33 ` pault at gcc dot gnu dot org
  2006-04-23  5:39 ` pault at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-04-16  3:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pault at gcc dot gnu dot org  2006-04-16 03:45 -------
Subject: Bug 25597

Author: pault
Date: Sun Apr 16 03:45:24 2006
New Revision: 112981

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112981
Log:
2006-04-16  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/26822
        * intrinsic.c (add_functions): Mark LOGICAL as elemental.

        PR fortran/26787
        * expr.c (gfc_check_assign): Extend scope of error to include
        assignments to a procedure in the main program or, from a
        module or internal procedure that is not that represented by
        the lhs symbol. Use VARIABLE rather than l-value in message.

        PR fortran/27096
        * trans-array.c (gfc_trans_deferred_array): If the backend_decl
        is not a descriptor, dereference and then test and use the type.

        PR fortran/25597
        * trans-decl.c (gfc_trans_deferred_vars): Check if an array
        result, is also automatic character length.  If so, process
        the character length.

        PR fortran/18803
        PR fortran/25669
        PR fortran/26834
        * trans_intrinsic.c (gfc_walk_intrinsic_bound): Set
        data.info.dimen for bound intrinsics.
        * trans_array.c (gfc_conv_ss_startstride): Pick out LBOUND and
        UBOUND intrinsics and supply their shape information to the ss
        and the loop.

        PR fortran/27124
        * trans_expr.c (gfc_trans_function_call):  Add a new block, post,
        in to which all the argument post blocks are put.  Add this block
        to se->pre after a byref call or to se->post, otherwise.

2006-04-16  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/26787
        * gfortran.dg/proc_assign_1.f90: New test.
        * gfortran.dg/procedure_lvalue.f90: Change message.
        * gfortran.dg/namelist_4.f90: Add new error.

        PR fortran/27096
        * gfortran.dg/auto_pointer_array_result_1.f90

        PR fortran/27089
        * gfortran.dg/specification_type_resolution_1.f90

        PR fortran/18803
        PR fortran/25669
        PR fortran/26834
        * gfortran.dg/bounds_temporaries_1.f90: New test.

        PR fortran/27124
        * gfortran.dg/array_return_value_1.f90: New test.



Added:
    trunk/gcc/testsuite/gfortran.dg/array_return_value_1.f90
    trunk/gcc/testsuite/gfortran.dg/auto_char_pointer_array_result_1.f90
    trunk/gcc/testsuite/gfortran.dg/auto_pointer_array_result_1.f90
    trunk/gcc/testsuite/gfortran.dg/bounds_temporaries_1.f90
    trunk/gcc/testsuite/gfortran.dg/proc_assign_1.f90
    trunk/gcc/testsuite/gfortran.dg/specification_type_resolution_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/namelist_4.f90
    trunk/gcc/testsuite/gfortran.dg/procedure_lvalue.f90


-- 


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


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

* [Bug fortran/25597] ICE with allocate on the return value of a function, character array with a len of an argument
  2005-12-29 18:01 [Bug fortran/25597] New: [ICE] in fold_binary, at fold-const.c:7198 krange at lhup dot edu
                   ` (7 preceding siblings ...)
  2006-04-16  3:45 ` pault at gcc dot gnu dot org
@ 2006-04-23  5:33 ` pault at gcc dot gnu dot org
  2006-04-23  5:39 ` pault at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-04-23  5:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pault at gcc dot gnu dot org  2006-04-23 05:33 -------
Subject: Bug 25597

Author: pault
Date: Sun Apr 23 05:33:16 2006
New Revision: 113191

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113191
Log:
2006-04-23  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/27122
        * resolve.c (resolve_function): Remove general restriction on auto
        character length function interfaces.
        (gfc_resolve_uops): Check restrictions on defined operator
        procedures.
        (resolve_types): Call the check for defined operators.

        PR fortran/27113
        * trans-array.c (get_array_ctor_var_strlen): Remove typo in enum.
        Part of the fix in 4.2, which does not work in 4.1 because the
        divergence is now too great.

        PR fortran/26822
        * intrinsic.c (add_functions): Mark LOGICAL as elemental.

        PR fortran/26787
        * expr.c (gfc_check_assign): Extend scope of error to include
        assignments to a procedure in the main program or, from a
        module or internal procedure that is not that represented by
        the lhs symbol. Use VARIABLE rather than l-value in message.

        PR fortran/25597
        * trans-decl.c (gfc_trans_deferred_vars): Check if an array
        result, is also automatic character length.  If so, process
        the character length. Note that this fixes the bug in 4.2
        but not here in 4.1 because the trees have diverged too much.
        Manifestly correct, so applied anyway.

        PR fortran/18803
        PR fortran/25669
        PR fortran/26834
        * trans_intrinsic.c (gfc_walk_intrinsic_bound): Set
        data.info.dimen for bound intrinsics.
        * trans_array.c (gfc_conv_ss_startstride): Pick out LBOUND and
        UBOUND intrinsics and supply their shape information to the ss
        and the loop.

        PR fortran/27124
        * trans_expr.c (gfc_trans_function_call):  Add a new block, post,
        in to which all the argument post blocks are put.  Add this block
        to se->pre after a byref call or to se->post, otherwise.

2006-04-23  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/27122
        * gfortran.dg/defined_operators_1.f90: New test.
        * gfortran.dg/assumed_charlen_function_1.f90: Add new error and
        remove old ones associated, incorrectly, with Note 5.46.

        PR fortran/26787
        * gfortran.dg/proc_assign_1.f90: New test.
        * gfortran.dg/procedure_lvalue.f90: Change message.
        * gfortran.dg/namelist_4.f90: Add new error.

        PR fortran/27089
        * gfortran.dg/specification_type_resolution_1.f90

        PR fortran/18803
        PR fortran/25669
        PR fortran/26834
        * gfortran.dg/bounds_temporaries_1.f90: New test.

        PR fortran/27124
        * gfortran.dg/array_return_value_1.f90: New test.



Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/array_return_value_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/bounds_temporaries_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/defined_operators_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/proc_assign_1.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/specification_type_resolution_1.f90
Modified:
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/expr.c
    branches/gcc-4_1-branch/gcc/fortran/intrinsic.c
    branches/gcc-4_1-branch/gcc/fortran/resolve.c
    branches/gcc-4_1-branch/gcc/fortran/trans-array.c
    branches/gcc-4_1-branch/gcc/fortran/trans-decl.c
    branches/gcc-4_1-branch/gcc/fortran/trans-expr.c
    branches/gcc-4_1-branch/gcc/fortran/trans-intrinsic.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_function_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_4.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/procedure_lvalue.f90


-- 


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


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

* [Bug fortran/25597] ICE with allocate on the return value of a function, character array with a len of an argument
  2005-12-29 18:01 [Bug fortran/25597] New: [ICE] in fold_binary, at fold-const.c:7198 krange at lhup dot edu
                   ` (8 preceding siblings ...)
  2006-04-23  5:33 ` pault at gcc dot gnu dot org
@ 2006-04-23  5:39 ` pault at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-04-23  5:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pault at gcc dot gnu dot org  2006-04-23 05:39 -------
Fixed on trunk but,sadly, not on 4.1 because divergences have become too great.

Paul


-- 

pault at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2006-04-23  5:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-29 18:01 [Bug fortran/25597] New: [ICE] in fold_binary, at fold-const.c:7198 krange at lhup dot edu
2005-12-29 18:02 ` [Bug fortran/25597] " krange at lhup dot edu
2005-12-29 18:13 ` pinskia at gcc dot gnu dot org
2005-12-29 18:21 ` pinskia at gcc dot gnu dot org
2006-01-01  6:09 ` [Bug fortran/25597] ICE with allocate on the return value of a function, character with a len of an argument pinskia at gcc dot gnu dot org
2006-01-01  6:27 ` [Bug fortran/25597] ICE with allocate on the return value of a function, character array " pinskia at gcc dot gnu dot org
2006-04-10 14:35 ` paul dot richard dot thomas at cea dot fr
2006-04-12 19:28 ` patchapp at dberlin dot org
2006-04-16  3:45 ` pault at gcc dot gnu dot org
2006-04-23  5:33 ` pault at gcc dot gnu dot org
2006-04-23  5:39 ` pault at gcc dot gnu dot 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).