public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/19546] New: Internal subroutine setting function return value gives internal compiler error
@ 2005-01-20 15:35 nburrell at unc dot edu
  2005-01-20 15:42 ` [Bug fortran/19546] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: nburrell at unc dot edu @ 2005-01-20 15:35 UTC (permalink / raw)
  To: gcc-bugs

With gcc 4.0.0 20050119 
on powerpc-apple-darwin7.7.0 (Dual G5 mac running Mac OS X 10.3.7) 
and GCC configured with: /Users/nburrell/Desktop/gcc-4.0-cvs/gcc/configure --with-mpfr=/Users/
nburrell/usr --with-gmp=/Users/nburrell/usr --prefix=/Users/nburrell/usr --enable-
languages=c,f95

running the command gfortran -Wall -v -save-temps test_gfortran.f90 gives the following output:

nburrell@braeburn[~/isis_home/research/pvsim/test]$ gfortran -Wall -v -save-temps test_gfortran.f90
Driving: gfortran -Wall -v -save-temps test_gfortran.f90 -lgfortranbegin -lgfortran -shared-libgcc
Using built-in specs.
Configured with: /Users/nburrell/Desktop/gcc-4.0-cvs/gcc/configure --with-mpfr=/Users/nburrell/
usr --with-gmp=/Users/nburrell/usr --prefix=/Users/nburrell/usr --enable-languages=c,f95
Thread model: posix
gcc version 4.0.0 20050119 (experimental)
 /Users/nburrell/usr/libexec/gcc/powerpc-apple-darwin7.7.0/4.0.0/f951 test_gfortran.f90 -fPIC 
-quiet -dumpbase test_gfortran.f90 -auxbase test_gfortran -Wall -version -o test_gfortran.s
GNU F95 version 4.0.0 20050119 (experimental) (powerpc-apple-darwin7.7.0)
        compiled by GNU C version 4.0.0 20050118 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
test_gfortran.f90: In function 'set_value':
test_gfortran.f90:15: internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:317
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

where test_gfortran.f90 has the following contents:

    MODULE random_standard_normal_mod

      IMPLICIT NONE

    CONTAINS

      FUNCTION random_standard_normal()
        IMPLICIT NONE

        REAL :: y
        REAL :: random_standard_normal
        
        y = 4.

        CALL set_value
        RETURN

      CONTAINS

        SUBROUTINE set_value

          IMPLICIT NONE

          random_standard_normal = y
        END SUBROUTINE set_value
      END FUNCTION random_standard_normal
    END MODULE random_standard_normal_mod

-- 
           Summary: Internal subroutine setting function return value gives
                    internal compiler error
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nburrell at unc dot edu
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: powerpc-apple-darwin7.7.0


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


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

* [Bug fortran/19546] Internal subroutine setting function return value gives internal compiler error
  2005-01-20 15:35 [Bug fortran/19546] New: Internal subroutine setting function return value gives internal compiler error nburrell at unc dot edu
@ 2005-01-20 15:42 ` pinskia at gcc dot gnu dot org
  2005-06-06 10:22 ` fxcoudert at gcc dot gnu dot org
  2005-09-19 15:15 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-20 15:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-20 15:42 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-01-20 15:42:32
               date|                            |


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


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

* [Bug fortran/19546] Internal subroutine setting function return value gives internal compiler error
  2005-01-20 15:35 [Bug fortran/19546] New: Internal subroutine setting function return value gives internal compiler error nburrell at unc dot edu
  2005-01-20 15:42 ` [Bug fortran/19546] " pinskia at gcc dot gnu dot org
@ 2005-06-06 10:22 ` fxcoudert at gcc dot gnu dot org
  2005-09-19 15:15 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-06-06 10:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-06-06 10:22 -------
Shorter testcase:

function f
  integer :: f
  contains
    subroutine sub
      f = 1
    end subroutine sub
end function f

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |P dot Schaffnit at access
                   |                            |dot rwth-aachen dot de
   Last reconfirmed|2005-04-22 05:11:52         |2005-06-06 10:22:21
               date|                            |


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


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

* [Bug fortran/19546] Internal subroutine setting function return value gives internal compiler error
  2005-01-20 15:35 [Bug fortran/19546] New: Internal subroutine setting function return value gives internal compiler error nburrell at unc dot edu
  2005-01-20 15:42 ` [Bug fortran/19546] " pinskia at gcc dot gnu dot org
  2005-06-06 10:22 ` fxcoudert at gcc dot gnu dot org
@ 2005-09-19 15:15 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-19 15:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-19 15:14 -------
*** Bug 23962 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oona dot scotti at irsn dot
                   |                            |fr


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


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

* [Bug fortran/19546] Internal subroutine setting function return value gives internal compiler error
       [not found] <bug-19546-9964@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2006-03-06 23:21 ` pault at gcc dot gnu dot org
@ 2006-03-09  0:35 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-09  0:35 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.2.0


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


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

* [Bug fortran/19546] Internal subroutine setting function return value gives internal compiler error
       [not found] <bug-19546-9964@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2006-03-06 22:56 ` pault at gcc dot gnu dot org
@ 2006-03-06 23:21 ` pault at gcc dot gnu dot org
  2006-03-09  0:35 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-03-06 23:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pault at gcc dot gnu dot org  2006-03-06 23:21 -------
This will only be fixed on 4.2.  The 4.1 and 4.2 trees have diverged so much in
gfc_get_fake_result_decl that it will be a lot of work to bring it up to the
point where it will take the patch for this PR.

Paul


-- 

pault at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/19546] Internal subroutine setting function return value gives internal compiler error
       [not found] <bug-19546-9964@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-02-14 23:11 ` pault at gcc dot gnu dot org
@ 2006-03-06 22:56 ` pault at gcc dot gnu dot org
  2006-03-06 23:21 ` pault at gcc dot gnu dot org
  2006-03-09  0:35 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-03-06 22:56 UTC (permalink / raw)
  To: gcc-bugs



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

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


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

* [Bug fortran/19546] Internal subroutine setting function return value gives internal compiler error
       [not found] <bug-19546-9964@http.gcc.gnu.org/bugzilla/>
  2006-02-08 15:14 ` tobi at gcc dot gnu dot org
  2006-02-12 13:34 ` pault at gcc dot gnu dot org
@ 2006-02-14 23:11 ` pault at gcc dot gnu dot org
  2006-03-06 22:56 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-02-14 23:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2006-02-14 23:11 -------
(In reply to comment #5)
> A patch is on its way in the next 48 hours - I have it working with no
> regressions; it needs tidying up and a full set of testcases writing.

"Tidying up" proved to be a bit bloody once I latched onto entries.... *sigh*
The patch has been submitted a few minutes ago.

Paul


-- 


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


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

* [Bug fortran/19546] Internal subroutine setting function return value gives internal compiler error
       [not found] <bug-19546-9964@http.gcc.gnu.org/bugzilla/>
  2006-02-08 15:14 ` tobi at gcc dot gnu dot org
@ 2006-02-12 13:34 ` pault at gcc dot gnu dot org
  2006-02-14 23:11 ` pault at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-02-12 13:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pault at gcc dot gnu dot org  2006-02-12 13:34 -------
A patch is on its way in the next 48 hours - I have it working with no
regressions; it needs tidying up and a full set of testcases writing.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug fortran/19546] Internal subroutine setting function return value gives internal compiler error
       [not found] <bug-19546-9964@http.gcc.gnu.org/bugzilla/>
@ 2006-02-08 15:14 ` tobi at gcc dot gnu dot org
  2006-02-12 13:34 ` pault at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: tobi at gcc dot gnu dot org @ 2006-02-08 15:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tobi at gcc dot gnu dot org  2006-02-08 15:14 -------
Corrected testcase:
function f()
  integer :: f
  contains
    subroutine sub
      f = 1
    end subroutine sub
end function f

The ICE is now at:
t.f90:4: internal compiler error: in gfc_conv_variable, at
fortran/trans-expr.c:354


-- 

tobi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tobi at gcc dot gnu dot org


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


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

end of thread, other threads:[~2006-03-09  0:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-20 15:35 [Bug fortran/19546] New: Internal subroutine setting function return value gives internal compiler error nburrell at unc dot edu
2005-01-20 15:42 ` [Bug fortran/19546] " pinskia at gcc dot gnu dot org
2005-06-06 10:22 ` fxcoudert at gcc dot gnu dot org
2005-09-19 15:15 ` pinskia at gcc dot gnu dot org
     [not found] <bug-19546-9964@http.gcc.gnu.org/bugzilla/>
2006-02-08 15:14 ` tobi at gcc dot gnu dot org
2006-02-12 13:34 ` pault at gcc dot gnu dot org
2006-02-14 23:11 ` pault at gcc dot gnu dot org
2006-03-06 22:56 ` pault at gcc dot gnu dot org
2006-03-06 23:21 ` pault at gcc dot gnu dot org
2006-03-09  0:35 ` 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).