public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/26107]  New: ICE after error message on invalid code
@ 2006-02-05 17:47 pinskia at gcc dot gnu dot org
  2006-02-06  9:34 ` [Bug fortran/26107] " reichelt at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-05 17:47 UTC (permalink / raw)
  To: gcc-bugs

Testcase:
   pure function equals(self,string,ignore_case) result(same)
         if (end>len(self)) return
   end function

===
I was trying to reduce an ICE and found this one.


-- 
           Summary: ICE after error message on invalid code
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


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

* [Bug fortran/26107] ICE after error message on invalid code
  2006-02-05 17:47 [Bug fortran/26107] New: ICE after error message on invalid code pinskia at gcc dot gnu dot org
@ 2006-02-06  9:34 ` reichelt at gcc dot gnu dot org
  2006-03-01 12:36 ` paul dot richard dot thomas at cea dot fr
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-02-06  9:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from reichelt at gcc dot gnu dot org  2006-02-06 09:34 -------
Confirmed.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |monitored
   Last reconfirmed|0000-00-00 00:00:00         |2006-02-06 09:34:50
               date|                            |


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


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

* [Bug fortran/26107] ICE after error message on invalid code
  2006-02-05 17:47 [Bug fortran/26107] New: ICE after error message on invalid code pinskia at gcc dot gnu dot org
  2006-02-06  9:34 ` [Bug fortran/26107] " reichelt at gcc dot gnu dot org
@ 2006-03-01 12:36 ` paul dot richard dot thomas at cea dot fr
  2006-03-03  5:50 ` patchapp at dberlin dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2006-03-01 12:36 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1675 bytes --]



------- Comment #2 from paul dot richard dot thomas at cea dot fr  2006-03-01 12:36 -------
This fixes it:

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c       (révision 111471)
+++ gcc/fortran/resolve.c       (copie de travail)
@@ -1357,7 +1357,7 @@

   need_full_assumed_size = temp;

-  if (!pure_function (expr, &name))
+  if (!pure_function (expr, &name) && name)
     {
       if (forall_flag)

and this tests it:

! { dg-do compile }
! Tests fix for PR26107 in which an ICE would occur after the second
! error message below.  This resulted from a spurious attempt to
! produce the third error message, without the name of the function.
!
! This is an expanded version of the testcase in the PR.
!
   pure function equals(self, &     ! { dg-error "must be INTENT(IN)" }
                        string, ignore_case) result(same)
         character(*), intent(in) :: string
         integer(4), intent(in) :: ignore_case
         integer(4) :: same
         if (len (self) < 1) return ! { dg-error "Type of argument" }
         same = 1
   end function

   function impure(self) result(ival)
         character(*), intent(in) :: self
         ival = 1
   end function

   pure function purity(self, string, ignore_case) result(same)
         character(*), intent(in) :: self
         character(*), intent(in) :: string
         integer(4), intent(in) :: ignore_case
         integer i
         if (end > impure (self)) & ! { dg-error "non-PURE procedure" }
           return
   end function

Will post to the list tonight.

Paul


-- 


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


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

* [Bug fortran/26107] ICE after error message on invalid code
  2006-02-05 17:47 [Bug fortran/26107] New: ICE after error message on invalid code pinskia at gcc dot gnu dot org
  2006-02-06  9:34 ` [Bug fortran/26107] " reichelt at gcc dot gnu dot org
  2006-03-01 12:36 ` paul dot richard dot thomas at cea dot fr
@ 2006-03-03  5:50 ` patchapp at dberlin dot org
  2006-03-06 22:56 ` pault at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: patchapp at dberlin dot org @ 2006-03-03  5:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from patchapp at dberlin dot org  2006-03-03 05:50 -------
Subject: Bug number PR26107

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-03/msg00186.html


-- 


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


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

* [Bug fortran/26107] ICE after error message on invalid code
  2006-02-05 17:47 [Bug fortran/26107] New: ICE after error message on invalid code pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-03-03  5:50 ` patchapp at dberlin dot org
@ 2006-03-06 22:56 ` pault at gcc dot gnu dot org
  2006-03-06 23:03 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-03-06 22:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2006-03-06 22:56 -------
Subject: Bug 26107

Author: pault
Date: Mon Mar  6 22:56:39 2006
New Revision: 111793

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

        PR fortran/26107
        * resolve.c (resolve_function): Add name after test for pureness.

        PR fortran/19546
        * trans-expr.c (gfc_conv_variable): Detect reference to parent result,
        store current_function_decl, replace with parent, whilst calls are
        made to gfc_get_fake_result_decl, and restore afterwards. Signal this
        to gfc_get_fake_result_decl with a new argument, parent_flag.
        * trans-stmt.c (gfc_trans_return): gfc_get_fake_result_decl 2nd arg
        is set to zero.
        * trans.h: Add parent_flag to gfc_get_fake_result_decl prototype.
        * trans-decl.c (gfc_get_fake_result_decl): On parent_flag, being set,
        add decl to parent function. Replace refs to current_fake_result_decl
        with refs to this_result_decl.
        (gfc_generate_function_code): Null parent_fake_result_decl before the
        translation of code for contained procedures. Set parent_flag to zero
        in call to gfc_get_fake_result_decl.
        * trans-intrinsic.c (gfc_conv_intrinsic_len): The same.

2006-03-06  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/26107
        * pure_dummy_length_1.f90: New test.

        PR fortran/19546
        * gfortran.dg/parent_result_ref_1.f90: New test.
        * gfortran.dg/parent_result_ref_2.f90: New test.
        * gfortran.dg/parent_result_ref_3.f90: New test.
        * gfortran.dg/parent_result_ref_4.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/parent_result_ref_1.f90
    trunk/gcc/testsuite/gfortran.dg/parent_result_ref_2.f90
    trunk/gcc/testsuite/gfortran.dg/parent_result_ref_3.f90   (with props)
    trunk/gcc/testsuite/gfortran.dg/parent_result_ref_4.f90
    trunk/gcc/testsuite/gfortran.dg/pure_dummy_length_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/fortran/trans-openmp.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/fortran/trans.h
    trunk/gcc/testsuite/ChangeLog

Propchange: trunk/gcc/testsuite/gfortran.dg/parent_result_ref_3.f90
            ('svn:executable' added)


-- 


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


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

* [Bug fortran/26107] ICE after error message on invalid code
  2006-02-05 17:47 [Bug fortran/26107] New: ICE after error message on invalid code pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-03-06 22:56 ` pault at gcc dot gnu dot org
@ 2006-03-06 23:03 ` pault at gcc dot gnu dot org
  2006-03-07  0:07 ` pault at gcc dot gnu dot org
  2006-03-07  2:25 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-03-06 23:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pault at gcc dot gnu dot org  2006-03-06 23:03 -------
Fixed on mainline and will be fixed tomorrow on 4.1.

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=26107


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

* [Bug fortran/26107] ICE after error message on invalid code
  2006-02-05 17:47 [Bug fortran/26107] New: ICE after error message on invalid code pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-03-06 23:03 ` pault at gcc dot gnu dot org
@ 2006-03-07  0:07 ` pault at gcc dot gnu dot org
  2006-03-07  2:25 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-03-07  0:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2006-03-07 00:06 -------
Subject: Bug 26107

Author: pault
Date: Tue Mar  7 00:06:37 2006
New Revision: 111796

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

        PR fortran/26107
        * resolve.c (resolve_function): Add name after test for pureness.

        * iresolve.c (gfc_resolve_dot_product):  Remove any difference in
        treatment of logical types.
        * trans-intrinsic.c (gfc_conv_intrinsic_dot_product):  New function. 

        PR fortran/26393
        * trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
        must be referenced to include unreferenced symbols in an interface
        body. 

        PR fortran/20938
        * trans-array.c (gfc_conv_resolve_dependencies): Add call to
        gfc_are_equivalenced_arrays.
        * symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
        functions. (gfc_free_namespace): Call them.
        * trans-common.c (copy_equiv_list_to_ns): New function.
        (add_equivalences): Call it.
        * gfortran.h: Add equiv_lists to gfc_namespace and define
        gfc_equiv_list and gfc_equiv_info.
        * dependency.c (gfc_are_equivalenced_arrays): New function.
        (gfc_check_dependency): Call it.
        * dependency.h: Prototype for gfc_are_equivalenced_arrays.

        PR fortran/24519
        * dependency.c (gfc_is_same_range): Correct typo.
        (gfc_check_section_vs_section): Call gfc_is_same_range.

        PR fortran/25395
        * trans-common.c (add_equivalences): Add a new flag that is set when
        an equivalence is seen that prevents more from being reset until the
        start of a new traversal of the list, thus ensuring completion of
        all the equivalences.

        PR fortran/25054
        * resolve.c (is_non_constant_shape_array): New function.
        (resolve_fl_variable): Remove code for the new function and call it.
        (resolve_fl_namelist): New function.  Add test for namelist array
        with non-constant shape, using is_non_constant_shape_array.
        (resolve_symbol): Remove code for resolve_fl_namelist and call it.

        PR fortran/25089
        * match.c (match_namelist): Increment the refs field of an accepted
        namelist object symbol.
        * resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
        with contained or module procedures.

        PR fortran/24557
        * trans-expr.c (gfc_add_interface_mapping): Use the actual argument
        for character(*) arrays, rather than casting to the type and kind
        parameters of the formal argument.

2006-03-07  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/26107
        * resolve.c (resolve_function): Add name after test for pureness.

        * gfortran.dg/logical_dot_product.f90: New test. 

        PR fortran/26393
        * gfortran.dg/used_interface_ref.f90: New test.

        PR fortran/20938
        * gfortran.dg/dependency_2.f90: New test.
        * gfortran.fortran-torture/execute/where17.f90: New test.
        * gfortran.fortran-torture/execute/where18.f90: New test.
        * gfortran.fortran-torture/execute/where19.f90: New test.
        * gfortran.fortran-torture/execute/where20.f90: New test.

        PR fortran/24519
        * gfortran.dg/dependency_3.f90: New test.
        * gfortran.fortran-torture/execute/vect-3.f90: Remove two of the
        XFAILs.

        PR fortran/25395
        * gfortran.dg/equiv_6.f90: New test.

        PR fortran/25054
        * gfortran.dg/namelist_5.f90: New test.

        PR fortran/25089
        * gfortran.dg/namelist_4.f90: New test.

        PR fortran/24557
        * gfortran.dg/assumed_charlen_needed_1.f90: New test.

Added:
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_needed_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_2.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependency_3.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/equiv_6.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/logical_dot_product.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_4.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_5.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pure_dummy_length_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_interface_ref.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where17.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where18.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where19.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.fortran-torture/execute/where20.f90
Modified:
    branches/gcc-4_1-branch/MAINTAINERS
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/dependency.c
    branches/gcc-4_1-branch/gcc/fortran/dependency.h
    branches/gcc-4_1-branch/gcc/fortran/dump-parse-tree.c
    branches/gcc-4_1-branch/gcc/fortran/gfortran.h
    branches/gcc-4_1-branch/gcc/fortran/iresolve.c
    branches/gcc-4_1-branch/gcc/fortran/match.c
    branches/gcc-4_1-branch/gcc/fortran/resolve.c
    branches/gcc-4_1-branch/gcc/fortran/symbol.c
    branches/gcc-4_1-branch/gcc/fortran/trans-array.c
    branches/gcc-4_1-branch/gcc/fortran/trans-common.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/vect/vect-3.f90


-- 


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


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

* [Bug fortran/26107] ICE after error message on invalid code
  2006-02-05 17:47 [Bug fortran/26107] New: ICE after error message on invalid code pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-03-07  0:07 ` pault at gcc dot gnu dot org
@ 2006-03-07  2:25 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-07  2:25 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.1


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


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

end of thread, other threads:[~2006-03-07  2:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-05 17:47 [Bug fortran/26107] New: ICE after error message on invalid code pinskia at gcc dot gnu dot org
2006-02-06  9:34 ` [Bug fortran/26107] " reichelt at gcc dot gnu dot org
2006-03-01 12:36 ` paul dot richard dot thomas at cea dot fr
2006-03-03  5:50 ` patchapp at dberlin dot org
2006-03-06 22:56 ` pault at gcc dot gnu dot org
2006-03-06 23:03 ` pault at gcc dot gnu dot org
2006-03-07  0:07 ` pault at gcc dot gnu dot org
2006-03-07  2:25 ` pinskia 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).