This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/83149] [8 Regression] ICE on SELECT CASE: crash_signal in toplev.c:325
- From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 26 Dec 2017 23:41:01 +0000
- Subject: [Bug fortran/83149] [8 Regression] ICE on SELECT CASE: crash_signal in toplev.c:325
- Auto-submitted: auto-generated
- References: <bug-83149-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83149
--- Comment #8 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Dec 26, 2017 at 09:42:54PM +0000, neil.n.carlson at gmail dot com
wrote:
>
> Perhaps this modification of comment 2 code is clearer.
ncell is never set.
> Put this in one file:
>
> module mod1
> integer :: ncells
> end module
>
> module mod2
> contains
> function get() result(array)
> use mod1
> real array(ncells)
The reference to ncells is to an undefined entity.
> array = 1.0
> end function
> end module
>
> And this in another (this is different):
>
> subroutine sub
> use mod2
You need to have
ncells = 1 ! or some other value here.
> s = sum(get())
> end
>
> This gives an ICE when compiled with 8.0.0 (20171222).
The code with ncells properly defined defined still
hits an ICE. This probably a result of not walking
mod2's namespace, but I haven't tried to debug the
problem beyond this.