public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/28353]  New: ICE: Segmentation fault
@ 2006-07-11 23:00 tobias dot burnus at physik dot fu-berlin dot de
  2006-07-11 23:01 ` [Bug fortran/28353] " tobias dot burnus at physik dot fu-berlin dot de
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-07-11 23:00 UTC (permalink / raw)
  To: gcc-bugs

gfortran -c mpi_bc_all.f
mpi_bc_all.F: In function 'mpi_bc_all':
mpi_bc_all.F:276: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

GNU Fortran 95 (GCC) 4.2.0 20060711 (experimental)


-- 
           Summary: ICE: Segmentation fault
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tobias dot burnus at physik dot fu-berlin dot de


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


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

* [Bug fortran/28353] ICE: Segmentation fault
  2006-07-11 23:00 [Bug fortran/28353] New: ICE: Segmentation fault tobias dot burnus at physik dot fu-berlin dot de
@ 2006-07-11 23:01 ` tobias dot burnus at physik dot fu-berlin dot de
  2006-07-12  0:00 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-07-11 23:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tobias dot burnus at physik dot fu-berlin dot de  2006-07-11 23:01 -------
Created an attachment (id=11862)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11862&action=view)
Test file: mpi_bc_all.f


-- 


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


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

* [Bug fortran/28353] ICE: Segmentation fault
  2006-07-11 23:00 [Bug fortran/28353] New: ICE: Segmentation fault tobias dot burnus at physik dot fu-berlin dot de
  2006-07-11 23:01 ` [Bug fortran/28353] " tobias dot burnus at physik dot fu-berlin dot de
@ 2006-07-12  0:00 ` pinskia at gcc dot gnu dot org
  2006-07-12  6:30 ` tobias dot burnus at physik dot fu-berlin dot de
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-12  0:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-07-12 00:00 -------
This file alone is not going to be able to reproduce this bug.
Can you attach mpif.h also?

INCLUDE 'mpif.h'


-- 


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


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

* [Bug fortran/28353] ICE: Segmentation fault
  2006-07-11 23:00 [Bug fortran/28353] New: ICE: Segmentation fault tobias dot burnus at physik dot fu-berlin dot de
  2006-07-11 23:01 ` [Bug fortran/28353] " tobias dot burnus at physik dot fu-berlin dot de
  2006-07-12  0:00 ` pinskia at gcc dot gnu dot org
@ 2006-07-12  6:30 ` tobias dot burnus at physik dot fu-berlin dot de
  2006-07-12 11:54 ` paul dot richard dot thomas at cea dot fr
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-07-12  6:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from tobias dot burnus at physik dot fu-berlin dot de  2006-07-12 06:30 -------
Created an attachment (id=11863)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11863&action=view)
mpif.h (from MPICH)

> This file alone is not going to be able to reproduce this bug.
> Can you attach mpif.h also?
> INCLUDE 'mpif.h'
Hmm, I though I checked that no other files are needed. Anyway, here it is.


-- 


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


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

* [Bug fortran/28353] ICE: Segmentation fault
  2006-07-11 23:00 [Bug fortran/28353] New: ICE: Segmentation fault tobias dot burnus at physik dot fu-berlin dot de
                   ` (2 preceding siblings ...)
  2006-07-12  6:30 ` tobias dot burnus at physik dot fu-berlin dot de
@ 2006-07-12 11:54 ` paul dot richard dot thomas at cea dot fr
  2006-07-12 15:19 ` fxcoudert at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2006-07-12 11:54 UTC (permalink / raw)
  To: gcc-bugs

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



------- Comment #4 from paul dot richard dot thomas at cea dot fr  2006-07-12 11:54 -------
Tobias,

I am so glad to see that somebody is passing components of derived type arrays;
I bust myself to make that work!  Anyway, I partially broke it with a recent
patch - sorry.

Reduced testcase:

SUBROUTINE mpi_bc_all(lda_u, ntypd)
  TYPE t_utype
    INTEGER l
  END TYPE t_utype
  TYPE (t_utype), INTENT (INOUT) :: lda_u(ntypd)
  EXTERNAL MPI_BCAST
  CALL MPI_BCAST(lda_u(:)%l) ! No explicit interface -> no fsym -> segfault
END SUBROUTINE mpi_bc_all

A work around is to add an interface:

  interface
    subroutine MPI_BCAST (i)
      integer, dimension (:) :: i
    end subroutine MPI_BCAST
  end interface

Here is a patch that works.  It is not regtested but I am sure that it is
bombproof.  I will do all the regtesting tonight and commit it as "obvious"
tomorrow morning.

Patch:

Index: gcc/fortran/trans-expr.c
===================================================================
--- gcc/fortran/trans-expr.c    (r&#9500;®vision 115306)
+++ gcc/fortran/trans-expr.c    (copie de travail)
@@ -1980,7 +1980,8 @@
                   array of derived types.  In this case, the argument
                   is converted to a temporary, which is passed and then
                   written back after the procedure call.  */
-               gfc_conv_aliased_arg (&parmse, e, f, fsym->attr.intent);
+               gfc_conv_aliased_arg (&parmse, e, f,
+                                     fsym ? fsym->attr.intent : INTENT_INOUT);
              else
                gfc_conv_array_parameter (&parmse, e, argss, f);

Paul 


-- 


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


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

* [Bug fortran/28353] ICE: Segmentation fault
  2006-07-11 23:00 [Bug fortran/28353] New: ICE: Segmentation fault tobias dot burnus at physik dot fu-berlin dot de
                   ` (3 preceding siblings ...)
  2006-07-12 11:54 ` paul dot richard dot thomas at cea dot fr
@ 2006-07-12 15:19 ` fxcoudert at gcc dot gnu dot org
  2006-07-12 16:39 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-07-12 15:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2006-07-12 15:19 -------
Confirmed, then, if there's a patch already :)


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-07-12 15:19:19
               date|                            |


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


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

* [Bug fortran/28353] ICE: Segmentation fault
  2006-07-11 23:00 [Bug fortran/28353] New: ICE: Segmentation fault tobias dot burnus at physik dot fu-berlin dot de
                   ` (4 preceding siblings ...)
  2006-07-12 15:19 ` fxcoudert at gcc dot gnu dot org
@ 2006-07-12 16:39 ` pault at gcc dot gnu dot org
  2006-07-16 17:17 ` pault at gcc dot gnu dot org
  2006-07-16 17:20 ` pault at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-07-12 16:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2006-07-12 16:39 -------
FX

I couldn't do the confirmation from the lab!

Thanks

Paul


-- 


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


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

* [Bug fortran/28353] ICE: Segmentation fault
  2006-07-11 23:00 [Bug fortran/28353] New: ICE: Segmentation fault tobias dot burnus at physik dot fu-berlin dot de
                   ` (5 preceding siblings ...)
  2006-07-12 16:39 ` pault at gcc dot gnu dot org
@ 2006-07-16 17:17 ` pault at gcc dot gnu dot org
  2006-07-16 17:20 ` pault at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-07-16 17:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pault at gcc dot gnu dot org  2006-07-16 17:17 -------
Subject: Bug 28353

Author: pault
Date: Sun Jul 16 17:17:04 2006
New Revision: 115502

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

        PR fortran/28384
        * trans-common.c (translate_common): If common_segment is NULL
        emit error that common block does not exist.

        PR fortran/20844
        * io.c (check_io_constraints): It is an error if an ADVANCE
        specifier appears without an explicit format.

        PR fortran/28201
        * resolve.c (resolve_generic_s): For a use_associated function,
        do not search for an alternative symbol in the parent name
        space.

        PR fortran/20893
        * resolve.c (resolve_elemental_actual): New function t combine
        all the checks of elemental procedure actual arguments. In
        addition, check of array valued optional args(this PR) has
        been added.
        (resolve_function, resolve_call): Remove parts that treated
        elemental procedure actual arguments and call the above.

        PR fortran/28353
        * trans-expr.c (gfc_conv_aliased_arg): Missing formal arg means
        that intent is INOUT (fixes regression).

        PR fortran/25097
        * check.c (check_present): The only permitted reference is a
        full array reference.

        PR fortran/20903
        * decl.c (variable_decl): Add error if a derived type is not
        from the current namespace if the namespace is an interface
        body.

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

        PR fortran/20844
        * gfortran.dg/io_constaints_2.f90: Add the test for ADVANCE
        specifiers requiring an explicit format tag..

        PR fortran/28201
        * gfortran.dg/generic_5: New test.

        PR fortran/20893
        * gfortran.dg/elemental_optional_args_1.f90: New test.

        PR fortran/25097
        * gfortran.dg/present_1.f90: New test.

        PR fortran/20903
        * gfortran.dg/interface_derived_type_1.f90: New test.

Added:
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/elemental_optional_args_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/generic_5.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/present_1.f90
Modified:
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/check.c
    branches/gcc-4_1-branch/gcc/fortran/decl.c
    branches/gcc-4_1-branch/gcc/fortran/io.c
    branches/gcc-4_1-branch/gcc/fortran/resolve.c
    branches/gcc-4_1-branch/gcc/fortran/trans-common.c
    branches/gcc-4_1-branch/gcc/fortran/trans-expr.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/io_constraints_2.f90


-- 


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


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

* [Bug fortran/28353] ICE: Segmentation fault
  2006-07-11 23:00 [Bug fortran/28353] New: ICE: Segmentation fault tobias dot burnus at physik dot fu-berlin dot de
                   ` (6 preceding siblings ...)
  2006-07-16 17:17 ` pault at gcc dot gnu dot org
@ 2006-07-16 17:20 ` pault at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-07-16 17:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pault at gcc dot gnu dot org  2006-07-16 17:20 -------
Fixed on trunk and 4.2

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


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

end of thread, other threads:[~2006-07-16 17:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-11 23:00 [Bug fortran/28353] New: ICE: Segmentation fault tobias dot burnus at physik dot fu-berlin dot de
2006-07-11 23:01 ` [Bug fortran/28353] " tobias dot burnus at physik dot fu-berlin dot de
2006-07-12  0:00 ` pinskia at gcc dot gnu dot org
2006-07-12  6:30 ` tobias dot burnus at physik dot fu-berlin dot de
2006-07-12 11:54 ` paul dot richard dot thomas at cea dot fr
2006-07-12 15:19 ` fxcoudert at gcc dot gnu dot org
2006-07-12 16:39 ` pault at gcc dot gnu dot org
2006-07-16 17:17 ` pault at gcc dot gnu dot org
2006-07-16 17:20 ` 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).