public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/55272] New: [4.8 Regression] ICE on passing coarray argument between files
@ 2012-11-11 17:37 dominiq at lps dot ens.fr
  2012-11-11 17:38 ` [Bug fortran/55272] " dominiq at lps dot ens.fr
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-11-11 17:37 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55272
           Summary: [4.8 Regression] ICE on passing coarray argument
                    between files
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominiq@lps.ens.fr
                CC: burnus@gcc.gnu.org


>From http://gcc.gnu.org/ml/fortran/2012-11/msg00021.html

$ cat co_sum_module.f90
module co_sum_module
  implicit none
contains
  subroutine co_sum(scalar)
    integer scalar[*]
  end subroutine
end module

$ cat league.f90 
program main
  use co_sum_module
  implicit none    
  integer score[*] 
  call co_sum(score)
end program

$ gfortran -c -fcoarray=single co_sum_module.f90
$ gfortran -fcoarray=single league.f90 co_sum_module.o
league.f90: In function 'MAIN__':
league.f90:5:0: internal compiler error: Segmentation fault: 11
   call co_sum(score)

Revision 189780 (2012-07-23) is OK, revision 189986 (2012-07-30) gives the ICE.
The backtrace at r193387 is

#0  gfc_get_nodesc_array_type (etype=<value optimized out>, as=<value optimized
out>, packed=<value optimized out>, restricted=<value optimized out>)
    at ../../_clean/gcc/fortran/trans-types.c:1574
#1  0x000000010011f778 in gfc_sym_type (sym=<value optimized out>) at
../../_clean/gcc/fortran/trans-types.c:2157
#2  0x000000010011e3a5 in gfc_get_function_type (sym=<value optimized out>) at
../../_clean/gcc/fortran/trans-types.c:2766
#3  0x00000001000e3bbe in gfc_get_extern_function_decl (sym=<value optimized
out>) at ../../_clean/gcc/fortran/trans-decl.c:1750
#4  0x00000001000efbf2 in gfc_conv_procedure_call (se=<value optimized out>,
sym=<value optimized out>, args=<value optimized out>, 
    expr=<value optimized out>, append_args=<value optimized out>) at
../../_clean/gcc/fortran/trans-expr.c:2675
#5  0x0000000100111b20 in gfc_trans_call (code=<value optimized out>,
dependency_check=<value optimized out>, mask=<value optimized out>, 
    count1=<value optimized out>, invert=<value optimized out>) at
../../_clean/gcc/fortran/trans-stmt.c:407
#6  0x00000001000c85f0 in trans_code (code=0x141514fb0, cond=0x0) at
../../_clean/gcc/fortran/trans.c:1385
#7  0x00000001000e7004 in gfc_generate_function_code (ns=<value optimized out>)
at ../../_clean/gcc/fortran/trans-decl.c:5349
#8  0x000000010008465f in gfc_parse_file () at
../../_clean/gcc/fortran/parse.c:4634
#9  0x00000001000c4376 in gfc_be_parse_file () at
../../_clean/gcc/fortran/f95-lang.c:191
#10 0x000000010066a509 in compile_file () at ../../_clean/gcc/toplev.c:544
#11 0x000000010066c369 in toplev_main (argc=4, argv=0x7fff5fbfd758) at
../../_clean/gcc/toplev.c:1864
#12 0x000000010000acb4 in start (pc=<value optimized out>, bases=0x0) at
../../../_clean/libgcc/config/unwind-dw2-fde-darwin.c:271

The ICE disappears if I revert revision 189881 on top of 193391.

Note that the ICE can be reproduced with a single file compiled with
-fcoarray=single -fno-whole-file.


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

* [Bug fortran/55272] [4.8 Regression] ICE on passing coarray argument between files
  2012-11-11 17:37 [Bug fortran/55272] New: [4.8 Regression] ICE on passing coarray argument between files dominiq at lps dot ens.fr
@ 2012-11-11 17:38 ` dominiq at lps dot ens.fr
  2012-11-12  9:21 ` burnus at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-11-11 17:38 UTC (permalink / raw)
  To: gcc-bugs


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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-11-11
     Ever Confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-11-11 17:38:17 UTC ---
Confirmed.


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

* [Bug fortran/55272] [4.8 Regression] ICE on passing coarray argument between files
  2012-11-11 17:37 [Bug fortran/55272] New: [4.8 Regression] ICE on passing coarray argument between files dominiq at lps dot ens.fr
  2012-11-11 17:38 ` [Bug fortran/55272] " dominiq at lps dot ens.fr
@ 2012-11-12  9:21 ` burnus at gcc dot gnu.org
  2012-11-12 10:40 ` dominiq at lps dot ens.fr
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-11-12  9:21 UTC (permalink / raw)
  To: gcc-bugs


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |4.8.0

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-11-12 09:21:16 UTC ---
The culprit seems to be Rev. 189881.

Untested patch:

--- module.c    (Revision 193396)
+++ module.c    (Arbeitskopie)
@@ -2395,7 +2395,7 @@ mio_array_spec (gfc_array_spec **asp)
   if (iomode == IO_INPUT && as->corank)
     as->cotype = (as->type == AS_DEFERRED) ? AS_DEFERRED : AS_EXPLICIT;

-  if (as->rank > 0)
+  if (as->rank + as->corank > 0)
     for (i = 0; i < as->rank + as->corank; i++)
       {
        mio_expr (&as->lower[i]);


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

* [Bug fortran/55272] [4.8 Regression] ICE on passing coarray argument between files
  2012-11-11 17:37 [Bug fortran/55272] New: [4.8 Regression] ICE on passing coarray argument between files dominiq at lps dot ens.fr
  2012-11-11 17:38 ` [Bug fortran/55272] " dominiq at lps dot ens.fr
  2012-11-12  9:21 ` burnus at gcc dot gnu.org
@ 2012-11-12 10:40 ` dominiq at lps dot ens.fr
  2012-11-12 10:52 ` dominiq at lps dot ens.fr
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-11-12 10:40 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-11-12 10:40:30 UTC ---
> The culprit seems to be Rev. 189881.
>
> Untested patch:
> ...

AFAICT the patch does not fix this PR.


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

* [Bug fortran/55272] [4.8 Regression] ICE on passing coarray argument between files
  2012-11-11 17:37 [Bug fortran/55272] New: [4.8 Regression] ICE on passing coarray argument between files dominiq at lps dot ens.fr
                   ` (2 preceding siblings ...)
  2012-11-12 10:40 ` dominiq at lps dot ens.fr
@ 2012-11-12 10:52 ` dominiq at lps dot ens.fr
  2012-11-12 11:03 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-11-12 10:52 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-11-12 10:52:30 UTC ---
Actually, the patch fixed the PR (I did not use the patched version
in the previous test).

Sorry for the noise.


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

* [Bug fortran/55272] [4.8 Regression] ICE on passing coarray argument between files
  2012-11-11 17:37 [Bug fortran/55272] New: [4.8 Regression] ICE on passing coarray argument between files dominiq at lps dot ens.fr
                   ` (3 preceding siblings ...)
  2012-11-12 10:52 ` dominiq at lps dot ens.fr
@ 2012-11-12 11:03 ` burnus at gcc dot gnu.org
  2012-11-12 11:10 ` burnus at gcc dot gnu.org
  2012-11-12 11:10 ` burnus at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-11-12 11:03 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-11-12 11:03:46 UTC ---
Author: burnus
Date: Mon Nov 12 11:03:42 2012
New Revision: 193429

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193429
Log:
2012-11-12  Tobias Burnus  <burnus@net-b.de>

        PR fortran/55272
        * module.c (mio_array_spec): Correctly handle coarray
        scalars.

2012-11-12  Tobias Burnus  <burnus@net-b.de>

        PR fortran/55272
        * gfortran.dg/coarray_29_1.f90: New.
        * gfortran.dg/coarray_29_2.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_29_1.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_29_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/module.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/55272] [4.8 Regression] ICE on passing coarray argument between files
  2012-11-11 17:37 [Bug fortran/55272] New: [4.8 Regression] ICE on passing coarray argument between files dominiq at lps dot ens.fr
                   ` (5 preceding siblings ...)
  2012-11-12 11:10 ` burnus at gcc dot gnu.org
@ 2012-11-12 11:10 ` burnus at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-11-12 11:10 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-11-12 11:09:50 UTC ---
FIXED on the 4.8 trunk (which was only affected).


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

* [Bug fortran/55272] [4.8 Regression] ICE on passing coarray argument between files
  2012-11-11 17:37 [Bug fortran/55272] New: [4.8 Regression] ICE on passing coarray argument between files dominiq at lps dot ens.fr
                   ` (4 preceding siblings ...)
  2012-11-12 11:03 ` burnus at gcc dot gnu.org
@ 2012-11-12 11:10 ` burnus at gcc dot gnu.org
  2012-11-12 11:10 ` burnus at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-11-12 11:10 UTC (permalink / raw)
  To: gcc-bugs


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

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

--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-11-12 11:10:16 UTC ---
really mark as fixed


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

end of thread, other threads:[~2012-11-12 11:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-11 17:37 [Bug fortran/55272] New: [4.8 Regression] ICE on passing coarray argument between files dominiq at lps dot ens.fr
2012-11-11 17:38 ` [Bug fortran/55272] " dominiq at lps dot ens.fr
2012-11-12  9:21 ` burnus at gcc dot gnu.org
2012-11-12 10:40 ` dominiq at lps dot ens.fr
2012-11-12 10:52 ` dominiq at lps dot ens.fr
2012-11-12 11:03 ` burnus at gcc dot gnu.org
2012-11-12 11:10 ` burnus at gcc dot gnu.org
2012-11-12 11:10 ` burnus 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).