public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11
@ 2022-04-06 15:59 kermitnuc at gmail dot com
  2022-04-06 17:06 ` [Bug fortran/105182] " kargl at gcc dot gnu.org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: kermitnuc at gmail dot com @ 2022-04-06 15:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

            Bug ID: 105182
           Summary: compiling NJOY21 causes a ICE segmentation fault: 11
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kermitnuc at gmail dot com
  Target Milestone: ---

GCC 10.3 compiles NJOY21 without issue.  GCC 11.1 and 11.2 do not.  

GCC configure script:
/configure  --prefix=/usr/local/gcc-1030 --enable-languages=c,c++,fortran,lto
CC=/usr/bin/gcc CXX=/usr/bin/g++ LD=/usr/bin/ld  --with-gmp=/usr/local
--with-mpfr=/usr/local  --with-mpc=/usr/local --with-isl=/usr/local
--with-libiconv-prefix=/usr/local --with-libiconv=/usr/local --with-system-zlib
--with-native-system-header-dir=/usr/include --build=x86_64-apple-darwin21.4.0 
CXXFLAGS="-I/usr/local/include " CCFLAGS="-I/usr/local/include " 
LDFLAGS="-L/usr/local/lib " CPPFLAGS="-I/usr/local/include " --enable-libatomic
--enable-libgomp --enable-libitm --enable-libquadmath
--enable-libquadmath-support -enable-shared --enable-shared-libgcc
--enable-static --enable-version-specific-runtime-libs
--with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk 

Similar for 11.1 and 11.2.
Using XCODE 13 on MacOS 12.3.1

NJOY21 is available at:  https://www.njoy21.io
The error when compiling the ERRORR.F90 subroutine.

NJOY configure script:
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE -D
CMAKE_CXX_COMPILER=/usr/local/gcc-1120/bin/x86_64-apple-darwin21.4.0-c++ -D
CMAKE_Fortran_COMPILER=/usr/local/gcc-1120/bin/x86_64-apple-darwin21.4.0-gfortran
-D CMAKE_Fortran_FLAGS_RELEASE='-fno-stack-limit -frecursive -fcheck=all
-pedantic -Wdo-subscript  -std=legacy -v -fdump-tree-original -Wdo-subscript '
../


Compiler output:


[ 27%] Building Fortran object
_deps/njoy-build/CMakeFiles/njoy.dir/src/samm.f90.o
/Users/kermitnuc/NJOY21/bin/_deps/njoy-src/src/samm.f90:4518:38:

 4515 |    do n=1,100
      |             2                         
......
 4518 |          a(n)=-(delta*(xn-1)*(xn-2)*a(n-1)+&
      |                                      1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2)
[-Wdo-subscript]
/Users/kermitnuc/NJOY21/bin/_deps/njoy-src/src/samm.f90:4519:37:

 4515 |    do n=1,100
      |             2                        
......
 4519 |            (rhoi-2*eta)*(delta**2)*a(n-2)+(delta**3)*a(n-3))/&
      |                                     1
Warning: Array reference at (1) out of bounds (-1 < 1) in loop beginning at (2)
[-Wdo-subscript]
/Users/kermitnuc/NJOY21/bin/_deps/njoy-src/src/samm.f90:4519:55:

 4515 |    do n=1,100
      |             2                                          
......
 4519 |            (rhoi-2*eta)*(delta**2)*a(n-2)+(delta**3)*a(n-3))/&
      |                                                       1
Warning: Array reference at (1) out of bounds (-2 < 1) in loop beginning at (2)
[-Wdo-subscript]
[ 28%] Building Fortran object
_deps/njoy-build/CMakeFiles/njoy.dir/src/errorr.f90.o
f951: internal compiler error: Segmentation fault: 11
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
make[2]: *** [_deps/njoy-build/CMakeFiles/njoy.dir/build.make:239:
_deps/njoy-build/CMakeFiles/njoy.dir/src/errorr.f90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2603:
_deps/njoy-build/CMakeFiles/njoy.dir/all] Error 2
make: *** [Makefile:161: all] Error 2

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

* [Bug fortran/105182] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
@ 2022-04-06 17:06 ` kargl at gcc dot gnu.org
  2022-04-06 20:50 ` kermitnuc at gmail dot com
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-04-06 17:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
Thanks for the report, but we're going to need some help.  Code in NJOY21
seems to be C++.  I found an errorr.f90 file under NJOY2016. This is an
11000 line code, which pulls in a number of modules.  Can you try to 
reduce this to something manageable?

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

* [Bug fortran/105182] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
  2022-04-06 17:06 ` [Bug fortran/105182] " kargl at gcc dot gnu.org
@ 2022-04-06 20:50 ` kermitnuc at gmail dot com
  2022-04-06 20:57 ` sgk at troutmask dot apl.washington.edu
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: kermitnuc at gmail dot com @ 2022-04-06 20:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

--- Comment #2 from Kermit Bunde <kermitnuc at gmail dot com> ---
(In reply to kargl from comment #1)
> Thanks for the report, but we're going to need some help.  Code in NJOY21
> seems to be C++.  I found an errorr.f90 file under NJOY2016. This is an
> 11000 line code, which pulls in a number of modules.  Can you try to 
> reduce this to something manageable?

If one comments out these lines in subroutine resprx:
         !--Unresolved
         if (lru.eq.2) then
            call rpxunr(a,amur,mxlru2,iest,ieed,nwscr)
         !--Resolved with sammy method
         else if (nmtres.gt.0) then
            call rpxsamm(nwscr,a,ier)
         !--Resolved with errorj method
         else
            if (lcomp.eq.0) then
               call rpxlc0(nwscr,a)
            else if (lcomp.eq.1.or.lcomp.eq.2) then
               call rpxlc12(nwscr,a,iest,ieed)
            endif
         endif

Then error.f90 will compile.
Is there a limit to how many subroutine calls are allowed?

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

* [Bug fortran/105182] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
  2022-04-06 17:06 ` [Bug fortran/105182] " kargl at gcc dot gnu.org
  2022-04-06 20:50 ` kermitnuc at gmail dot com
@ 2022-04-06 20:57 ` sgk at troutmask dot apl.washington.edu
  2022-04-06 21:54 ` kermitnuc at gmail dot com
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2022-04-06 20:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

--- Comment #3 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Apr 06, 2022 at 08:50:42PM +0000, kermitnuc at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182
> 
> --- Comment #2 from Kermit Bunde <kermitnuc at gmail dot com> ---
> (In reply to kargl from comment #1)
> > Thanks for the report, but we're going to need some help.  Code in NJOY21
> > seems to be C++.  I found an errorr.f90 file under NJOY2016. This is an
> > 11000 line code, which pulls in a number of modules.  Can you try to 
> > reduce this to something manageable?
> 
> If one comments out these lines in subroutine resprx:
>          !--Unresolved
>          if (lru.eq.2) then
>             call rpxunr(a,amur,mxlru2,iest,ieed,nwscr)
>          !--Resolved with sammy method
>          else if (nmtres.gt.0) then
>             call rpxsamm(nwscr,a,ier)
>          !--Resolved with errorj method
>          else
>             if (lcomp.eq.0) then
>                call rpxlc0(nwscr,a)
>             else if (lcomp.eq.1.or.lcomp.eq.2) then
>                call rpxlc12(nwscr,a,iest,ieed)
>             endif
>          endif
> 
> Then error.f90 will compile.
> Is there a limit to how many subroutine calls are allowed?
> 

No.  There is an OS imposed limit on stack memory. Perhaps,
you're hitting a stack limit.

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

* [Bug fortran/105182] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (2 preceding siblings ...)
  2022-04-06 20:57 ` sgk at troutmask dot apl.washington.edu
@ 2022-04-06 21:54 ` kermitnuc at gmail dot com
  2022-04-06 23:38 ` sgk at troutmask dot apl.washington.edu
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: kermitnuc at gmail dot com @ 2022-04-06 21:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

--- Comment #4 from Kermit Bunde <kermitnuc at gmail dot com> ---
This subroutine compiles when GCC 10.3 is used.  What was changed for 11.1 that
might impact this?

Is there a compiler option that I can use to provide more information to you?

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

* [Bug fortran/105182] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (3 preceding siblings ...)
  2022-04-06 21:54 ` kermitnuc at gmail dot com
@ 2022-04-06 23:38 ` sgk at troutmask dot apl.washington.edu
  2022-04-07  1:09 ` kermitnuc at gmail dot com
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2022-04-06 23:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Apr 06, 2022 at 09:54:00PM +0000, kermitnuc at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182
> 
> --- Comment #4 from Kermit Bunde <kermitnuc at gmail dot com> ---
> This subroutine compiles when GCC 10.3 is used.  What was changed for 11.1 that
> might impact this?

I have no idea.  A few hundered bug fixes and several new features
were added in 11.1.  

> 
> Is there a compiler option that I can use to provide more information to you?
> 

What is your stack size?  I suspect that gfortran is putting
more things on the stack such as temporary arrays and you've
exhausted it.

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

* [Bug fortran/105182] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (4 preceding siblings ...)
  2022-04-06 23:38 ` sgk at troutmask dot apl.washington.edu
@ 2022-04-07  1:09 ` kermitnuc at gmail dot com
  2022-04-07  2:58 ` sgk at troutmask dot apl.washington.edu
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: kermitnuc at gmail dot com @ 2022-04-07  1:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

--- Comment #6 from Kermit Bunde <kermitnuc at gmail dot com> ---
I ran the stack size up to ~64Mb.

I can compile MCNP which is much bigger.
Again, 10.3 compiled it with a stack size of 8 Mb.

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

* [Bug fortran/105182] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (5 preceding siblings ...)
  2022-04-07  1:09 ` kermitnuc at gmail dot com
@ 2022-04-07  2:58 ` sgk at troutmask dot apl.washington.edu
  2022-04-07  4:51 ` kargl at gcc dot gnu.org
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2022-04-07  2:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

--- Comment #7 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Thu, Apr 07, 2022 at 01:09:01AM +0000, kermitnuc at gmail dot com wrote:
> --- Comment #6 from Kermit Bunde <kermitnuc at gmail dot com> ---
> I ran the stack size up to ~64Mb.
> 
> I can compile MCNP which is much bigger.
> Again, 10.3 compiled it with a stack size of 8 Mb.
> 

Okay, so we may have eliminated the stack size,
which is a very common cause of segfaults.

You appear to be using Darwin.  I don't use
Darwin.  Restore the lines that you think
are causing a problem and start eliminate
all other code until you get a small 
manageable piece of code.

Until someone has time to do the debug, you
could use 10.3 as work around.

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

* [Bug fortran/105182] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (6 preceding siblings ...)
  2022-04-07  2:58 ` sgk at troutmask dot apl.washington.edu
@ 2022-04-07  4:51 ` kargl at gcc dot gnu.org
  2022-04-07  7:08 ` [Bug fortran/105182] [11/12 Regression] " rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-04-07  4:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

--- Comment #8 from kargl at gcc dot gnu.org ---
Okay, so I went to https://docs.njoy21.io/install.html
and started to follow the instructions to get the source.
After consuming 1.6 GB of diskspace where there are
no *.f90 files in those 1.6 GB, I am inclined to 
close this PR unless you come up with a small
testcase.

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

* [Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (7 preceding siblings ...)
  2022-04-07  4:51 ` kargl at gcc dot gnu.org
@ 2022-04-07  7:08 ` rguenth at gcc dot gnu.org
  2022-04-07  7:08 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-07  7:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |10.3.0
   Target Milestone|---                         |11.3
             Status|UNCONFIRMED                 |WAITING
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |11.1.0, 11.2.0
            Summary|compiling NJOY21 causes a   |[11/12 Regression]
                   |ICE segmentation fault: 11  |compiling NJOY21 causes a
                   |                            |ICE segmentation fault: 11
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-04-07

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can you collect the .f90 file exposing the issue plus all files required to
build imported modules and provide those as small testcase please?

It would also be helpful to see a backtrace of the faulting compiler.

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

* [Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (8 preceding siblings ...)
  2022-04-07  7:08 ` [Bug fortran/105182] [11/12 Regression] " rguenth at gcc dot gnu.org
@ 2022-04-07  7:08 ` rguenth at gcc dot gnu.org
  2022-04-07 19:47 ` kargl at gcc dot gnu.org
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-07  7:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4

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

* [Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (9 preceding siblings ...)
  2022-04-07  7:08 ` rguenth at gcc dot gnu.org
@ 2022-04-07 19:47 ` kargl at gcc dot gnu.org
  2022-04-07 21:23 ` kargl at gcc dot gnu.org
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-04-07 19:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |12.0

--- Comment #10 from kargl at gcc dot gnu.org ---
(In reply to Richard Biener from comment #9)
> Can you collect the .f90 file exposing the issue plus all files required to
> build imported modules and provide those as small testcase please?
> 
> It would also be helpful to see a backtrace of the faulting compiler.

This works with trunk.

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

* [Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (10 preceding siblings ...)
  2022-04-07 19:47 ` kargl at gcc dot gnu.org
@ 2022-04-07 21:23 ` kargl at gcc dot gnu.org
  2022-04-07 21:35 ` anlauf at gcc dot gnu.org
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-04-07 21:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|kargl at gcc dot gnu.org           |

--- Comment #11 from kargl at gcc dot gnu.org ---
Remove myself from CC list.  I do not have 11.x source tree.  Minimum example
that should have been supplied by someone else.

module errorm

   implicit none

   integer :: ngn, nis, isrr, nscr4
   real, dimension(:), allocatable::egn

   contains

      subroutine resprx(nwscr,a)
         integer :: nwscr
         real :: a(nwscr)
         integer :: iest, ieed
         integer, parameter :: mxlru2=10
         real::amur(3,mxlru2)
         do isrr=1, nis
            call rpxunr(a,amur,mxlru2,iest,ieed,nwscr)
         enddo
      end subroutine resprx

      subroutine rpxunr(a,amur,mxlru2,iest,ieed,nwscr)
         integer::mxlru2,iest,ieed,nwscr
         real::a(nwscr),amur(3,mxlru2)
         integer::ii
         integer,parameter::maxe=60
         real::sig(maxe,5)
         real::gsigr(4,25)
         ngn = 10
         allocate(egn(ngn))
         call rpxgrp(ngn,egn,sig,ii,gsigr,a,nwscr)
      end subroutine rpxunr

      subroutine covout
         integer:: nwds
         real,dimension(:),allocatable::scr
         nwds = 10
         allocate(scr(nwds))
         call resprx(nwds,scr)
      end subroutine covout

      subroutine rpxgrp(igx, egn, sig, ipoint, gsig, a, nwscr)
         integer :: igx, ipoint, nwscr
         integer, parameter:: maxe=60
         real :: egn(*), sig(maxe,5), gsig(4,25), a(nwscr)
      end subroutine rpxgrp

end module errorm

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

* [Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (11 preceding siblings ...)
  2022-04-07 21:23 ` kargl at gcc dot gnu.org
@ 2022-04-07 21:35 ` anlauf at gcc dot gnu.org
  2022-04-07 21:41 ` kargl at gcc dot gnu.org
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-04-07 21:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

--- Comment #12 from anlauf at gcc dot gnu.org ---
(In reply to kargl from comment #11)
> Remove myself from CC list.  I do not have 11.x source tree.  Minimum
> example that should have been supplied by someone else.

What options are needed to make it fail?

I can't reproduce a failure for this example on x86_64-pc-linux-gnu with
current HEAD of 11-branch.

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

* [Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (12 preceding siblings ...)
  2022-04-07 21:35 ` anlauf at gcc dot gnu.org
@ 2022-04-07 21:41 ` kargl at gcc dot gnu.org
  2022-04-07 21:58 ` anlauf at gcc dot gnu.org
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-04-07 21:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #13 from kargl at gcc dot gnu.org ---
(In reply to anlauf from comment #12)
> (In reply to kargl from comment #11)
> > Remove myself from CC list.  I do not have 11.x source tree.  Minimum
> > example that should have been supplied by someone else.
> 
> What options are needed to make it fail?
> 
> I can't reproduce a failure for this example on x86_64-pc-linux-gnu with
> current HEAD of 11-branch.

% gfortran11 --version
GNU Fortran (FreeBSD Ports Collection) 11.2.0

% gfortran11 -c errorr.f90
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

What the patch was that fixed the problem in trunk
may have been back ported to 11-branch.

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

* [Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (13 preceding siblings ...)
  2022-04-07 21:41 ` kargl at gcc dot gnu.org
@ 2022-04-07 21:58 ` anlauf at gcc dot gnu.org
  2022-04-07 22:35 ` sgk at troutmask dot apl.washington.edu
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-04-07 21:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

--- Comment #14 from anlauf at gcc dot gnu.org ---
I found a machine with 11.2 where I get the ICE.

Likely a duplicate of pr103609 which has been fixed.

If you agree, you may close this one as a duplicate.

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

* [Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (14 preceding siblings ...)
  2022-04-07 21:58 ` anlauf at gcc dot gnu.org
@ 2022-04-07 22:35 ` sgk at troutmask dot apl.washington.edu
  2022-04-08  8:04 ` gscfq@t-online.de
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2022-04-07 22:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

--- Comment #15 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Thu, Apr 07, 2022 at 09:58:36PM +0000, anlauf at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182
> 
> --- Comment #14 from anlauf at gcc dot gnu.org ---
> I found a machine with 11.2 where I get the ICE.
> 
> Likely a duplicate of pr103609 which has been fixed.
> 
> If you agree, you may close this one as a duplicate.
> 

I looked at that PR, but don't know if it is a dup or not.

I know that in errorr.f90, I have to retain the first
three subroutine.  If I comment out any one of of the
three, the code compiles.

In any evident, if the example I posted compiles for
you, I think we can close this with as FIXED.

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

* [Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (15 preceding siblings ...)
  2022-04-07 22:35 ` sgk at troutmask dot apl.washington.edu
@ 2022-04-08  8:04 ` gscfq@t-online.de
  2022-04-08 16:04 ` kargl at gcc dot gnu.org
  2022-04-10 15:43 ` kermitnuc at gmail dot com
  18 siblings, 0 replies; 20+ messages in thread
From: gscfq@t-online.de @ 2022-04-08  8:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

G. Steinmetz <gscfq@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gscfq@t-online.de

--- Comment #16 from G. Steinmetz <gscfq@t-online.de> ---

Seems to be fully covered by pr103609 (gfc_sym_get_dummy_args).
(that began to give an ICE between 20200726 and 20200809)

For this case :
Status of gcc-11 changed between 20200726 (ok) and 20200809 (ICE)
too, and gcc-11 was fixed between 20211113 (ICE) and 20211211 (ok).
Primarily gcc-12 was fixed between 20211205 (ICE) and 20211212 (ok).

Last backtrace for pr105182.f90 is :

$ gfortran-12-20211205 -c pr105182.f90
f951: internal compiler error: Segmentation fault
0xf0b99f crash_signal
        ../../gcc/toplev.c:322
0x87f8f0 gfc_sym_get_dummy_args(gfc_symbol*)
        ../../gcc/fortran/symbol.c:5243
0x94ec51 doloop_contained_procedure_code
        ../../gcc/fortran/frontend-passes.c:2483
0x954519 gfc_code_walker(gfc_code**, int (*)(gfc_code**, int*, void*), int
(*)(gfc_expr**, int*, void*), void*)
        ../../gcc/fortran/frontend-passes.c:5333
0x956a32 doloop_code
        ../../gcc/fortran/frontend-passes.c:2627
0x954519 gfc_code_walker(gfc_code**, int (*)(gfc_code**, int*, void*), int
(*)(gfc_expr**, int*, void*), void*)
        ../../gcc/fortran/frontend-passes.c:5333
0x954697 gfc_code_walker(gfc_code**, int (*)(gfc_code**, int*, void*), int
(*)(gfc_expr**, int*, void*), void*)
        ../../gcc/fortran/frontend-passes.c:5669
0x95570b doloop_warn
        ../../gcc/fortran/frontend-passes.c:3059
0x955c5a gfc_run_passes(gfc_namespace*)
        ../../gcc/fortran/frontend-passes.c:156
0x856467 gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:17572
0x8569a5 gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:17551
0x8569a5 update_current_proc_array_outer_dependency
        ../../gcc/fortran/resolve.c:3182
0x856d17 resolve_call
        ../../gcc/fortran/resolve.c:3809
0x853e49 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:12150
0x856377 resolve_codes
        ../../gcc/fortran/resolve.c:17531
0x8562ae resolve_codes
        ../../gcc/fortran/resolve.c:17514
0x85643e gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:17566
0x83e562 gfc_parse_file()
        ../../gcc/fortran/parse.c:6792
0x88c73f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216


BTW, an almost complete variation run did not yield any 
additional problem cases, only replicated the already known 
bug groups around pr103507 and pr99036.

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

* [Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (16 preceding siblings ...)
  2022-04-08  8:04 ` gscfq@t-online.de
@ 2022-04-08 16:04 ` kargl at gcc dot gnu.org
  2022-04-10 15:43 ` kermitnuc at gmail dot com
  18 siblings, 0 replies; 20+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-04-08 16:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

kargl at gcc dot gnu.org changed:

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

--- Comment #17 from kargl at gcc dot gnu.org ---
Given Gerhard's comment.  It seems that this is fixed in both trunk
and 11-branch.  Kermit, it seems your options are to use 10.3 until
the next version of 11 comes out.

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

* [Bug fortran/105182] [11/12 Regression] compiling NJOY21 causes a ICE segmentation fault: 11
  2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
                   ` (17 preceding siblings ...)
  2022-04-08 16:04 ` kargl at gcc dot gnu.org
@ 2022-04-10 15:43 ` kermitnuc at gmail dot com
  18 siblings, 0 replies; 20+ messages in thread
From: kermitnuc at gmail dot com @ 2022-04-10 15:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105182

--- Comment #18 from Kermit Bunde <kermitnuc at gmail dot com> ---
The latest GIT pull fixed the issue

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

end of thread, other threads:[~2022-04-10 15:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 15:59 [Bug fortran/105182] New: compiling NJOY21 causes a ICE segmentation fault: 11 kermitnuc at gmail dot com
2022-04-06 17:06 ` [Bug fortran/105182] " kargl at gcc dot gnu.org
2022-04-06 20:50 ` kermitnuc at gmail dot com
2022-04-06 20:57 ` sgk at troutmask dot apl.washington.edu
2022-04-06 21:54 ` kermitnuc at gmail dot com
2022-04-06 23:38 ` sgk at troutmask dot apl.washington.edu
2022-04-07  1:09 ` kermitnuc at gmail dot com
2022-04-07  2:58 ` sgk at troutmask dot apl.washington.edu
2022-04-07  4:51 ` kargl at gcc dot gnu.org
2022-04-07  7:08 ` [Bug fortran/105182] [11/12 Regression] " rguenth at gcc dot gnu.org
2022-04-07  7:08 ` rguenth at gcc dot gnu.org
2022-04-07 19:47 ` kargl at gcc dot gnu.org
2022-04-07 21:23 ` kargl at gcc dot gnu.org
2022-04-07 21:35 ` anlauf at gcc dot gnu.org
2022-04-07 21:41 ` kargl at gcc dot gnu.org
2022-04-07 21:58 ` anlauf at gcc dot gnu.org
2022-04-07 22:35 ` sgk at troutmask dot apl.washington.edu
2022-04-08  8:04 ` gscfq@t-online.de
2022-04-08 16:04 ` kargl at gcc dot gnu.org
2022-04-10 15:43 ` kermitnuc at gmail dot com

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