public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hj8758558 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/96920] New: ICE segmentation fault in tree-vectorizer at -O3
Date: Thu, 03 Sep 2020 13:26:39 +0000	[thread overview]
Message-ID: <bug-96920-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 96920
           Summary: ICE segmentation fault in tree-vectorizer at -O3
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hj8758558 at gmail dot com
  Target Milestone: ---

Created attachment 49179
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49179&action=edit
Example Fortran source file to trigger ICE in tree-vectorizer.

When I compile the attached code example with gfortran 10.x series at -O3, I
get the following compiler seg fault. The code compiles okay with gfortran 9.1.

The only previous bug report that I found that might be related is:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95539


$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/users/joshua.hykes/opt/gcc/linux-64/gcc-10.2.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/users/joshua.hykes/opt/gcc/linux-64/gcc-10.2.0-build/../gcc-10.2.0-src/configure
--prefix=/users/joshua.hykes/opt/gcc/linux-64/gcc-10.2.0-build/../gcc-10.2.0/
--enable-languages=c,c++,fortran,go
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (GCC)



$ cat ice.f90
             subroutine ice(npoint, nterm, x, g)
             implicit none
             integer    norder
             parameter (norder=10)
             integer j
             integer k
             integer ii
             integer nterm
             integer npoint
             real b(norder)
             real c(norder)
             real d(norder)
             real x(npoint)
             real g(npoint)
             real gg
             real prev
             real prev2
             !
                 j = 1
           100   continue
                 j = j+1
                 if (nterm == j)  then
                    do ii=1,npoint
                       k = nterm
                       gg= d(k)
                       prev= 0.0
                       do k=k-1,1,-1
                          prev2= prev
                          prev= gg
                          gg = d(k)+(x(ii)-b(k))*prev-c(k+1)*prev2
                       enddo
                       g(ii) = gg
                    enddo
                 endif
                 go to 100
             end


$ gfortran -O3 -c ice.f90
during GIMPLE pass: vect
ice.f90:1:0:

    1 |              subroutine ice(npoint, nterm, x, g)
      |
internal compiler error: Segmentation fault
0xbeddaf crash_signal
       
/users/joshua.hykes/opt/gcc/linux-64/gcc-10.2.0-build/../gcc-10.2.0-src/gcc/toplev.c:328
0x2b14706162ef ???
       
/usr/src/debug/glibc-2.17-c758a686/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xd01227 find_uses_to_rename_use
       
/users/joshua.hykes/opt/gcc/linux-64/gcc-10.2.0-build/../gcc-10.2.0-src/gcc/tree-ssa-loop-manip.c:393
0xd01227 find_uses_to_rename_bb
       
/users/joshua.hykes/opt/gcc/linux-64/gcc-10.2.0-build/../gcc-10.2.0-src/gcc/tree-ssa-loop-manip.c:468
0xd02e57 find_uses_to_rename
       
/users/joshua.hykes/opt/gcc/linux-64/gcc-10.2.0-build/../gcc-10.2.0-src/gcc/tree-ssa-loop-manip.c:500
0xd02e57 rewrite_into_loop_closed_ssa_1(bitmap_head*, unsigned int, int, loop*)
       
/users/joshua.hykes/opt/gcc/linux-64/gcc-10.2.0-build/../gcc-10.2.0-src/gcc/tree-ssa-loop-manip.c:666
0xe17043 vectorize_loops()
       
/users/joshua.hykes/opt/gcc/linux-64/gcc-10.2.0-build/../gcc-10.2.0-src/gcc/tree-vectorizer.c:1197
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

             reply	other threads:[~2020-09-03 13:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 13:26 hj8758558 at gmail dot com [this message]
2020-09-03 14:11 ` [Bug tree-optimization/96920] [10/11 Regression] " rguenth at gcc dot gnu.org
2020-09-03 14:12 ` rguenth at gcc dot gnu.org
2020-09-04  9:52 ` rguenth at gcc dot gnu.org
2020-09-04 12:31 ` rguenth at gcc dot gnu.org
2020-09-04 13:43 ` cvs-commit at gcc dot gnu.org
2020-09-04 13:43 ` [Bug tree-optimization/96920] [10 " rguenth at gcc dot gnu.org
2020-12-02 11:41 ` cvs-commit at gcc dot gnu.org
2020-12-02 11:41 ` rguenth at gcc dot gnu.org

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