public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "matthew.thompson at nasa dot gov" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/59093] New: internal compiler error: Segmentation fault compiling F90 File
Date: Tue, 12 Nov 2013 20:16:00 -0000	[thread overview]
Message-ID: <bug-59093-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 59093
           Summary: internal compiler error: Segmentation fault compiling
                    F90 File
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: matthew.thompson at nasa dot gov

Created attachment 31201
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31201&action=edit
Pre-processed source file

I'm getting an ICE compiling a Fortran file. I'll attach a stripped down
reproducer that demonstrates the problem (the real file is 3000+ lines and
requires many, many external modules and libraries).

Per instructions, running gfortran on our .F90:

$ gfortran -v -save-temps MAPL_LocStreamGet.F90
Driving: gfortran -v -save-temps MAPL_LocStreamGet.F90 -l gfortran -l m
-shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/other/SLES11.1/gcc/4.8.1/libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /gpfsm/dnbsrc/other/GCC/SLES11/4.8.1/gcc-4.8.1/configure
--prefix=/usr/local/other/SLES11.1/gcc/4.8.1 CC=gcc --enable-languages=all
--enable-bootstrap
Thread model: posix
gcc version 4.8.1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'

/usr/local/other/SLES11.1/gcc/4.8.1/libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/f951
MAPL_LocStreamGet.F90 -cpp=MAPL_LocStreamGet.f90 -quiet -v
MAPL_LocStreamGet.F90 -quiet -dumpbase MAPL_LocStreamGet.F90 -mtune=generic
-march=x86-64 -auxbase MAPL_LocStreamGet -version -fintrinsic-modules-path
/usr/local/other/SLES11.1/gcc/4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/finclude
-o MAPL_LocStreamGet.s
GNU Fortran (GCC) version 4.8.1 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.1, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/usr/local/other/SLES11.1/gcc/4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/usr/local/other/SLES11.1/gcc/4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/finclude
 /usr/local/intel/Composer/composer_xe_2013_sp1.0.080/mkl/include
 /gpfsm/dnb32/mbhat/TestSlurm/Installs/openmpi/1.7.2-gcc-4.8.1-shared/include

/usr/local/other/SLES11.1/gcc/4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/include
 /usr/local/include
 /usr/local/other/SLES11.1/gcc/4.8.1/include

/usr/local/other/SLES11.1/gcc/4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/include-fixed
 /usr/include
End of search list.
GNU Fortran (GCC) version 4.8.1 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.1, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
MAPL_LocStreamGet.F90: In function ‘mapl_locstreamget’:
MAPL_LocStreamGet.F90:111:0: internal compiler error: Segmentation fault
        tiletype => locstream%Ptr%Local_GeoLocation(:)%t
 ^
0x4eb078 ???
    ../sysdeps/x86_64/elf/start.S:113
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

And running on the attached pre-processed source file, MAPL_LocStreamGet.f90:

$ gfortran -v -save-temps MAPL_LocStreamGet.f90
Driving: gfortran -v -save-temps MAPL_LocStreamGet.f90 -l gfortran -l m
-shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/other/SLES11.1/gcc/4.8.1/libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /gpfsm/dnbsrc/other/GCC/SLES11/4.8.1/gcc-4.8.1/configure
--prefix=/usr/local/other/SLES11.1/gcc/4.8.1 CC=gcc --enable-languages=all
--enable-bootstrap
Thread model: posix
gcc version 4.8.1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'

/usr/local/other/SLES11.1/gcc/4.8.1/libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/f951
MAPL_LocStreamGet.f90 -quiet -dumpbase MAPL_LocStreamGet.f90 -mtune=generic
-march=x86-64 -auxbase MAPL_LocStreamGet -version -fintrinsic-modules-path
/usr/local/other/SLES11.1/gcc/4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/finclude
-o MAPL_LocStreamGet.s
GNU Fortran (GCC) version 4.8.1 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.1, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran (GCC) version 4.8.1 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.1, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
MAPL_LocStreamGet.f90: In function ‘mapl_locstreamget’:
MAPL_LocStreamGet.f90:111:0: internal compiler error: Segmentation fault
     end if
 ^
0x4eb078 ???
    ../sysdeps/x86_64/elf/start.S:113
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-434383-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Nov 12 20:17:40 2013
Return-Path: <gcc-bugs-return-434383-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 21979 invoked by alias); 12 Nov 2013 20:17:40 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 21841 invoked by uid 55); 12 Nov 2013 20:17:36 -0000
From: "abutcher at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58534] [c++1y] ICE with auto in template function parameters
Date: Tue, 12 Nov 2013 20:17:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: abutcher at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-58534-4-FchY2BSdXt@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58534-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58534-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg01160.txt.bz2
Content-length: 2732

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX534

--- Comment #1 from abutcher at gcc dot gnu.org ---
Author: abutcher
Date: Tue Nov 12 20:17:33 2013
New Revision: 204714

URL: http://gcc.gnu.org/viewcvs?rev 4714&root=gcc&view=rev
Log:
Refactor implicit function template implementation and fix 58534, 58536, 58548,
58549 and 58637.

gcc/
    * tree.c (grow_tree_vec_stat): New function ...
    * tree.h (grow_tree_vec_stat) (grow_tree_vec): ... and its declaration
    and macro front-end.

gcc/cp/
    PR c++/58534
    PR c++/58536
    PR c++/58548
    PR c++/58549
    PR c++/58637
    * parser.h (struct cp_parser): New members implicit_template_parms,
    implicit_template_scope and auto_is_implicit_function_template_parm_p.
    * parser.c (add_implicit_template_parms): Refactor as ...
    (synthesize_implicit_template_parm): ... this to append a new template
    type parm to the current template parameter list (introducing a new list
    if necessary).  Removed push_deferring_access_checks.
    (finish_fully_implicit_template): Removed pop_deferring_access_checks.
    (cp_parser_new): Initialize new cp_parser members.
    (cp_parser_parameter_declaration_clause): Consider auto as implicit
    template parm when parsing a parameter declaration (unless parsing an
    explicit specialization).
    (cp_parser_parameter_declaration_list): Remove local
    implicit_template_parms counter and reset cp_parser implicit template
    state when complete.
    (cp_parser_lambda_expression): Reset implicit template cp_parser members
    whilst generating lambda class.
    (cp_parser_function_definition_after_declarator): Reset implicit
    template cp_parser members whilst parsing function definition.
    (make_generic_type_name): Respell '<autoN>' as 'auto:N' which works
    better with template diagnostics.
    (cp_parser_simple_type_specifier): Synthesize implicit template parm on
    parsing 'auto' if auto_is_implicit_function_template_parm_p and provide
    diagnostics ...
    * decl.c (grokdeclarator): ... that were previously done here.

gcc/testsuite/g++.dg/
    * cpp1y/pr58534.C: New testcase.
    * cpp1y/pr58536.C: New testcase.
    * cpp1y/pr58548.C: New testcase.
    * cpp1y/pr58549.C: New testcase.
    * cpp1y/pr58637.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/pr58534.C
    trunk/gcc/testsuite/g++.dg/cpp1y/pr58536.C
    trunk/gcc/testsuite/g++.dg/cpp1y/pr58548.C
    trunk/gcc/testsuite/g++.dg/cpp1y/pr58549.C
    trunk/gcc/testsuite/g++.dg/cpp1y/pr58637.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/parser.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree.c
    trunk/gcc/tree.h


             reply	other threads:[~2013-11-12 20:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12 20:16 matthew.thompson at nasa dot gov [this message]
2013-11-12 20:58 ` [Bug fortran/59093] " dominiq at lps dot ens.fr
2013-11-12 21:13 ` dominiq at lps dot ens.fr
2014-01-04 17:17 ` janus at gcc dot gnu.org
2014-03-19 19:04 ` [Bug fortran/59093] Segfault in gfc_trans_pointer_assignment matthew.thompson at nasa dot gov
2014-03-26 18:29 ` matthew.thompson at nasa dot gov
2014-06-11 11:50 ` matthew.thompson at nasa dot gov
2015-01-25 21:30 ` anlauf at gmx dot de
2015-05-21 16:12 ` matthew.thompson at nasa dot gov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-59093-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).