public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Arfrever.FTA at GMail dot Com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/99375] New: Segmentation fault in code compiled with -O1 -ftree-loop-vectorize
Date: Thu, 04 Mar 2021 02:19:50 +0000	[thread overview]
Message-ID: <bug-99375-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 99375
           Summary: Segmentation fault in code compiled with -O1
                    -ftree-loop-vectorize
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Arfrever.FTA at GMail dot Com
  Target Milestone: ---

For MARISA project (https://github.com/s-yata/marisa-trie), GCC 10.2.0 with at
least CXXFLAGS="-O1 -ftree-loop-vectorize" generates code which fails with
segmentation fault.

GCC 8.4.0 and 9.3.0 are not affected, so this is regression in GCC 10.2.0.

Original report: https://github.com/s-yata/marisa-trie/issues/35


Steps to reproduce problem:

$ git clone https://github.com/s-yata/marisa-trie
$ cd marisa-trie
$ autoreconf -ifv
$ export CC="x86_64-pc-linux-gnu-gcc-10.2.0"
$ export CXX="x86_64-pc-linux-gnu-g++-10.2.0"
$ export CFLAGS="-O1 -ftree-loop-vectorize"
$ export CXXFLAGS="-O1 -ftree-loop-vectorize"
$ ./configure
$ make
$ make check
...
PASS: base-test
PASS: io-test
PASS: vector-test
PASS: trie-test
../test-driver: line 109: 12541 Segmentation fault      "$@" > $log_file 2>&1
FAIL: marisa-test


(MARISA does not have any dependencies besides Autotools and C++ compiler, so
reproduction should be easy.)


Failing program can be run manually in this way:

$ LD_LIBRARY_PATH="$(pwd)/lib/marisa/.libs" tests/.libs/marisa-test
marisa-test.cc:13: TestEmptyTrie(): ok
marisa-test.cc:87: TestTinyTrie(): ok
Segmentation fault

             reply	other threads:[~2021-03-04  2:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04  2:19 Arfrever.FTA at GMail dot Com [this message]
2021-03-04  8:06 ` [Bug c++/99375] " marxin at gcc dot gnu.org
2021-03-04 10:16 ` Arfrever.FTA at GMail dot Com

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