public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45595]  New: segfault on omp collapse
@ 2010-09-08 11:29 jv244 at cam dot ac dot uk
  2010-09-08 12:18 ` [Bug fortran/45595] " jakub at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jv244 at cam dot ac dot uk @ 2010-09-08 11:29 UTC (permalink / raw)
  To: gcc-bugs

this test case (with an invalid collapse):

  SUBROUTINE init_input_type()
  INTEGER :: k,l(3),u(3)
!$omp parallel do shared(l,u) collapse(3)
    DO k = l(3),u(3)
    ENDDO
  END SUBROUTINE

leads to an ice with current trunk as:

#0  gfc_resolve_omp_directive (code=0x1437880, ns=<value optimized out>) at
/data03/vondele/gcc_trunk/gcc/gcc/fortran/openmp.c:1519
#1  0x000000000051f74c in resolve_code (code=0x1437880, ns=0x1435f00) at
/data03/vondele/gcc_trunk/gcc/gcc/fortran/resolve.c:9126
#2  0x000000000052063a in resolve_codes (ns=0x1435f00) at
/data03/vondele/gcc_trunk/gcc/gcc/fortran/resolve.c:13339
#3  0x000000000052074c in gfc_resolve (ns=0x1435f00) at
/data03/vondele/gcc_trunk/gcc/gcc/fortran/resolve.c:13366
#4  0x0000000000513cd7 in gfc_parse_file () at
/data03/vondele/gcc_trunk/gcc/gcc/fortran/parse.c:4194
#5  0x000000000054ce7d in gfc_be_parse_file (set_yydebug=<value optimized out>)
at /data03/vondele/gcc_trunk/gcc/gcc/fortran/f95-lang.c:242
#6  0x000000000085fa4d in toplev_main (argc=20, argv=0x7fff13674938) at
/data03/vondele/gcc_trunk/gcc/gcc/toplev.c:972
#7  0x00007ffdb4e7d436 in __libc_start_main () from /lib64/libc.so.6
#8  0x00000000004aa599 in _start ()


-- 
           Summary: segfault on omp collapse
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


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


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

* [Bug fortran/45595] segfault on omp collapse
  2010-09-08 11:29 [Bug fortran/45595] New: segfault on omp collapse jv244 at cam dot ac dot uk
@ 2010-09-08 12:18 ` jakub at gcc dot gnu dot org
  2010-09-08 14:03 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-08 12:18 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-09-08 12:18:18
               date|                            |


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


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

* [Bug fortran/45595] segfault on omp collapse
  2010-09-08 11:29 [Bug fortran/45595] New: segfault on omp collapse jv244 at cam dot ac dot uk
  2010-09-08 12:18 ` [Bug fortran/45595] " jakub at gcc dot gnu dot org
@ 2010-09-08 14:03 ` jakub at gcc dot gnu dot org
  2010-09-08 16:46 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-08 14:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jakub at gcc dot gnu dot org  2010-09-08 14:02 -------
Created an attachment (id=21738)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21738&action=view)
gcc46-pr45595.patch

Untested fix.


-- 


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


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

* [Bug fortran/45595] segfault on omp collapse
  2010-09-08 11:29 [Bug fortran/45595] New: segfault on omp collapse jv244 at cam dot ac dot uk
  2010-09-08 12:18 ` [Bug fortran/45595] " jakub at gcc dot gnu dot org
  2010-09-08 14:03 ` jakub at gcc dot gnu dot org
@ 2010-09-08 16:46 ` jakub at gcc dot gnu dot org
  2010-09-08 17:23 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-08 16:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2010-09-08 16:46 -------
Subject: Bug 45595

Author: jakub
Date: Wed Sep  8 16:46:13 2010
New Revision: 164004

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164004
Log:
        PR fortran/45595
        * openmp.c (resolve_omp_do): Report not enough do loops for
        collapse even if block->next is NULL.

        * gfortran.dg/gomp/pr45595.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/gomp/pr45595.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/openmp.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/45595] segfault on omp collapse
  2010-09-08 11:29 [Bug fortran/45595] New: segfault on omp collapse jv244 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2010-09-08 16:46 ` jakub at gcc dot gnu dot org
@ 2010-09-08 17:23 ` jakub at gcc dot gnu dot org
  2010-09-08 17:24 ` jakub at gcc dot gnu dot org
  2010-09-08 17:52 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-08 17:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2010-09-08 17:22 -------
Subject: Bug 45595

Author: jakub
Date: Wed Sep  8 17:22:36 2010
New Revision: 164007

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164007
Log:
        PR fortran/45595
        * openmp.c (resolve_omp_do): Report not enough do loops for
        collapse even if block->next is NULL.

        * gfortran.dg/gomp/pr45595.f90: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/gomp/pr45595.f90
Modified:
    branches/gcc-4_5-branch/gcc/fortran/ChangeLog
    branches/gcc-4_5-branch/gcc/fortran/openmp.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/45595] segfault on omp collapse
  2010-09-08 11:29 [Bug fortran/45595] New: segfault on omp collapse jv244 at cam dot ac dot uk
                   ` (3 preceding siblings ...)
  2010-09-08 17:23 ` jakub at gcc dot gnu dot org
@ 2010-09-08 17:24 ` jakub at gcc dot gnu dot org
  2010-09-08 17:52 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-08 17:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2010-09-08 17:24 -------
Subject: Bug 45595

Author: jakub
Date: Wed Sep  8 17:23:52 2010
New Revision: 164008

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164008
Log:
        PR fortran/45595
        * openmp.c (resolve_omp_do): Report not enough do loops for
        collapse even if block->next is NULL.

        * gfortran.dg/gomp/pr45595.f90: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/gomp/pr45595.f90
Modified:
    branches/gcc-4_4-branch/gcc/fortran/ChangeLog
    branches/gcc-4_4-branch/gcc/fortran/openmp.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/45595] segfault on omp collapse
  2010-09-08 11:29 [Bug fortran/45595] New: segfault on omp collapse jv244 at cam dot ac dot uk
                   ` (4 preceding siblings ...)
  2010-09-08 17:24 ` jakub at gcc dot gnu dot org
@ 2010-09-08 17:52 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-08 17:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2010-09-08 17:52 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2010-09-08 17:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-08 11:29 [Bug fortran/45595] New: segfault on omp collapse jv244 at cam dot ac dot uk
2010-09-08 12:18 ` [Bug fortran/45595] " jakub at gcc dot gnu dot org
2010-09-08 14:03 ` jakub at gcc dot gnu dot org
2010-09-08 16:46 ` jakub at gcc dot gnu dot org
2010-09-08 17:23 ` jakub at gcc dot gnu dot org
2010-09-08 17:24 ` jakub at gcc dot gnu dot org
2010-09-08 17:52 ` jakub 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).