public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47331] New: ICE in make_decl_rtl, at varasm.c:1133
@ 2011-01-17 16:26 fago at earthlink dot net
  2011-01-17 17:40 ` [Bug fortran/47331] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: fago at earthlink dot net @ 2011-01-17 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE in make_decl_rtl, at varasm.c:1133
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: fago@earthlink.net


Created attachment 22996
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22996
reproducer

Compiling the attached test case with:

gfortran-4.6-010811 -ffixed-form -cpp -ffixed-line-length-132 -fopenmp -c -o
test-ice.o test-ice.f

results in:

test-ice.f: In function ‘wrt’:
test-ice.f:34:0: internal compiler error: in make_decl_rtl, at varasm.c:1133
Please submit a full bug report,


Note that -fopenmp is required.

I have not yet had time to try the latest snapshot, and do not currently build
trunk directly from svn.


This was found using the 08-Jan-2011 snapshot built with:

gfortran-4.6-010811 -v
Using built-in specs.
COLLECT_GCC=gfortran-4.6-010811
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.6-20110108/configure --prefix=/usr/local
--libdir=/usr/local/lib64 --program-suffix=-4.6-010811 --with-arch=corei7
--enable-languages=c,c++,fortran --enable-gold
--enable-version-specific-runtime-libs --enable-checking=release
--with-system-zlib --enable-linux-futex --without-system-libunwind
--with-ppl=/usr/lib64 --with-cloog=/usr/lib64 --enable-lto
Thread model: posix
gcc version 4.6.0 20110108 (experimental) (GCC)


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

* [Bug fortran/47331] ICE in make_decl_rtl, at varasm.c:1133
  2011-01-17 16:26 [Bug fortran/47331] New: ICE in make_decl_rtl, at varasm.c:1133 fago at earthlink dot net
@ 2011-01-17 17:40 ` rguenth at gcc dot gnu.org
  2011-01-17 17:41 ` [Bug fortran/47331] [4.6 Regression] ICE in make_decl_rtl, at varasm.c:1133 (with -fopenmp) burnus at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-17 17:40 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.17 17:00:22
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-17 17:00:22 UTC ---
Confirmed.


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

* [Bug fortran/47331] [4.6 Regression] ICE in make_decl_rtl, at varasm.c:1133 (with -fopenmp)
  2011-01-17 16:26 [Bug fortran/47331] New: ICE in make_decl_rtl, at varasm.c:1133 fago at earthlink dot net
  2011-01-17 17:40 ` [Bug fortran/47331] " rguenth at gcc dot gnu.org
@ 2011-01-17 17:41 ` burnus at gcc dot gnu.org
  2011-01-17 17:50 ` [Bug fortran/47331] [4.5/4.6 " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-17 17:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code, openmp
                 CC|                            |burnus at gcc dot gnu.org
            Summary|ICE in make_decl_rtl, at    |[4.6 Regression] ICE in
                   |varasm.c:1133               |make_decl_rtl, at
                   |                            |varasm.c:1133 (with
                   |                            |-fopenmp)

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-17 17:02:21 UTC ---
I have marked it as 4.6 regression, though it might be no regression and just
an effect of release checking that it works with 4.4 and 4.5.

The failing assert is make_decl_rtl's

  /* A weak alias has TREE_PUBLIC set but not the other bits.  */
  gcc_assert (TREE_CODE (decl) != VAR_DECL
              || TREE_STATIC (decl)
              || TREE_PUBLIC (decl)
              || DECL_EXTERNAL (decl)
              || DECL_REGISTER (decl));

Reduced code:

      subroutine DOIT
!$OMP PARALLEL
!$OMP MASTER
        call WRT()
!!!$OMP END MASTER
!$OMP END PARALLEL
      end subroutine DOIT

      subroutine WRT()
        do K=1,5
          ICELL = INDEXMAKER(K)
        end do
      end subroutine DOIT

      call DOIT
      end


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

* [Bug fortran/47331] [4.5/4.6 Regression] ICE in make_decl_rtl, at varasm.c:1133 (with -fopenmp)
  2011-01-17 16:26 [Bug fortran/47331] New: ICE in make_decl_rtl, at varasm.c:1133 fago at earthlink dot net
  2011-01-17 17:40 ` [Bug fortran/47331] " rguenth at gcc dot gnu.org
  2011-01-17 17:41 ` [Bug fortran/47331] [4.6 Regression] ICE in make_decl_rtl, at varasm.c:1133 (with -fopenmp) burnus at gcc dot gnu.org
@ 2011-01-17 17:50 ` jakub at gcc dot gnu.org
  2011-01-17 17:57 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-17 17:50 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |jakub at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.5.3
            Summary|[4.6 Regression] ICE in     |[4.5/4.6 Regression] ICE in
                   |make_decl_rtl, at           |make_decl_rtl, at
                   |varasm.c:1133 (with         |varasm.c:1133 (with
                   |-fopenmp)                   |-fopenmp)

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-17 17:40:15 UTC ---
In 4.5 it ICEs with -fopenmp -fwhole-file.


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

* [Bug fortran/47331] [4.5/4.6 Regression] ICE in make_decl_rtl, at varasm.c:1133 (with -fopenmp)
  2011-01-17 16:26 [Bug fortran/47331] New: ICE in make_decl_rtl, at varasm.c:1133 fago at earthlink dot net
                   ` (2 preceding siblings ...)
  2011-01-17 17:50 ` [Bug fortran/47331] [4.5/4.6 " jakub at gcc dot gnu.org
@ 2011-01-17 17:57 ` jakub at gcc dot gnu.org
  2011-01-17 22:54 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-17 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-17 17:49:26 UTC ---
Created attachment 22997
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22997
gcc46-pr47331.patch

Untested fix.


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

* [Bug fortran/47331] [4.5/4.6 Regression] ICE in make_decl_rtl, at varasm.c:1133 (with -fopenmp)
  2011-01-17 16:26 [Bug fortran/47331] New: ICE in make_decl_rtl, at varasm.c:1133 fago at earthlink dot net
                   ` (3 preceding siblings ...)
  2011-01-17 17:57 ` jakub at gcc dot gnu.org
@ 2011-01-17 22:54 ` jakub at gcc dot gnu.org
  2011-01-17 23:05 ` [Bug fortran/47331] [4.5 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-17 22:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-17 22:26:47 UTC ---
Author: jakub
Date: Mon Jan 17 22:26:42 2011
New Revision: 168935

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168935
Log:
    PR fortran/47331
    * gfortran.h (struct gfc_omp_saved_state): New type.
    (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
    * resolve.c (resolve_global_procedure): Call it around gfc_resolve
    call.
    * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
    functions.

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

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


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

* [Bug fortran/47331] [4.5 Regression] ICE in make_decl_rtl, at varasm.c:1133 (with -fopenmp)
  2011-01-17 16:26 [Bug fortran/47331] New: ICE in make_decl_rtl, at varasm.c:1133 fago at earthlink dot net
                   ` (4 preceding siblings ...)
  2011-01-17 22:54 ` jakub at gcc dot gnu.org
@ 2011-01-17 23:05 ` jakub at gcc dot gnu.org
  2011-01-25 17:09 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-17 23:05 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.5/4.6 Regression] ICE in |[4.5 Regression] ICE in
                   |make_decl_rtl, at           |make_decl_rtl, at
                   |varasm.c:1133 (with         |varasm.c:1133 (with
                   |-fopenmp)                   |-fopenmp)

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-17 22:34:05 UTC ---
Fixed on the trunk so far.


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

* [Bug fortran/47331] [4.5 Regression] ICE in make_decl_rtl, at varasm.c:1133 (with -fopenmp)
  2011-01-17 16:26 [Bug fortran/47331] New: ICE in make_decl_rtl, at varasm.c:1133 fago at earthlink dot net
                   ` (5 preceding siblings ...)
  2011-01-17 23:05 ` [Bug fortran/47331] [4.5 " jakub at gcc dot gnu.org
@ 2011-01-25 17:09 ` burnus at gcc dot gnu.org
  2011-01-25 17:17 ` [Bug fortran/47331] [4.5/4.6 " burnus at gcc dot gnu.org
  2011-01-25 17:37 ` fago at earthlink dot net
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-25 17:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-25 17:01:10 UTC ---
Author: burnus
Date: Tue Jan 25 17:01:06 2011
New Revision: 169244

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169244
Log:
2011-01-25  Tobias Burnus  <burnus@net-b.de>

        Backport from mainline
        2011-01-17  Jakub Jelinek  <jakub@redhat.com>

        PR fortran/47331
        * gfortran.h (struct gfc_omp_saved_state): New type.
        (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
        prototypes.
        * resolve.c (resolve_global_procedure): Call it around
        gfc_resolve call.

2011-01-25  Tobias Burnus  <burnus@net-b.de>

        Backport from mainline
        2011-01-17  Jakub Jelinek  <jakub@redhat.com>

        PR fortran/47331
        * gfortran.dg/gomp/pr47331.f90: New test.


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


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

* [Bug fortran/47331] [4.5/4.6 Regression] ICE in make_decl_rtl, at varasm.c:1133 (with -fopenmp)
  2011-01-17 16:26 [Bug fortran/47331] New: ICE in make_decl_rtl, at varasm.c:1133 fago at earthlink dot net
                   ` (6 preceding siblings ...)
  2011-01-25 17:09 ` burnus at gcc dot gnu.org
@ 2011-01-25 17:17 ` burnus at gcc dot gnu.org
  2011-01-25 17:37 ` fago at earthlink dot net
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-25 17:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
            Summary|[4.5 Regression] ICE in     |[4.5/4.6 Regression] ICE in
                   |make_decl_rtl, at           |make_decl_rtl, at
                   |varasm.c:1133 (with         |varasm.c:1133 (with
                   |-fopenmp)                   |-fopenmp)

--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-25 17:02:47 UTC ---
FIXED on the trunk (4.6) and on the 4.5 branch.

Thanks for the report Matt! Thanks for the fix Jakub!


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

* [Bug fortran/47331] [4.5/4.6 Regression] ICE in make_decl_rtl, at varasm.c:1133 (with -fopenmp)
  2011-01-17 16:26 [Bug fortran/47331] New: ICE in make_decl_rtl, at varasm.c:1133 fago at earthlink dot net
                   ` (7 preceding siblings ...)
  2011-01-25 17:17 ` [Bug fortran/47331] [4.5/4.6 " burnus at gcc dot gnu.org
@ 2011-01-25 17:37 ` fago at earthlink dot net
  8 siblings, 0 replies; 10+ messages in thread
From: fago at earthlink dot net @ 2011-01-25 17:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Matt Fago <fago at earthlink dot net> 2011-01-25 17:10:07 UTC ---
Awesome, thanks all!

I'll continue testing the next snapshot.


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

end of thread, other threads:[~2011-01-25 17:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-17 16:26 [Bug fortran/47331] New: ICE in make_decl_rtl, at varasm.c:1133 fago at earthlink dot net
2011-01-17 17:40 ` [Bug fortran/47331] " rguenth at gcc dot gnu.org
2011-01-17 17:41 ` [Bug fortran/47331] [4.6 Regression] ICE in make_decl_rtl, at varasm.c:1133 (with -fopenmp) burnus at gcc dot gnu.org
2011-01-17 17:50 ` [Bug fortran/47331] [4.5/4.6 " jakub at gcc dot gnu.org
2011-01-17 17:57 ` jakub at gcc dot gnu.org
2011-01-17 22:54 ` jakub at gcc dot gnu.org
2011-01-17 23:05 ` [Bug fortran/47331] [4.5 " jakub at gcc dot gnu.org
2011-01-25 17:09 ` burnus at gcc dot gnu.org
2011-01-25 17:17 ` [Bug fortran/47331] [4.5/4.6 " burnus at gcc dot gnu.org
2011-01-25 17:37 ` fago at earthlink dot net

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).