public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99375] New: Segmentation fault in code compiled with -O1 -ftree-loop-vectorize
@ 2021-03-04  2:19 Arfrever.FTA at GMail dot Com
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Arfrever.FTA at GMail dot Com @ 2021-03-04  2:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

* [Bug c++/99375] Segmentation fault in code compiled with -O1 -ftree-loop-vectorize
  2021-03-04  2:19 [Bug c++/99375] New: Segmentation fault in code compiled with -O1 -ftree-loop-vectorize Arfrever.FTA at GMail dot Com
@ 2021-03-04  8:06 ` marxin at gcc dot gnu.org
  2021-03-04 10:16 ` Arfrever.FTA at GMail dot Com
  1 sibling, 0 replies; 3+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-03-04  8:06 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
                 CC|                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Thanks for the report. It's dup of PR97236, which is fixed on gcc-10 branch.

*** This bug has been marked as a duplicate of bug 97236 ***

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

* [Bug c++/99375] Segmentation fault in code compiled with -O1 -ftree-loop-vectorize
  2021-03-04  2:19 [Bug c++/99375] New: Segmentation fault in code compiled with -O1 -ftree-loop-vectorize Arfrever.FTA at GMail dot Com
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Arfrever.FTA at GMail dot Com @ 2021-03-04 10:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail dot Com> ---
I confirm that backporting of GCC commit
1ab88985631dd2c5a5e3b5c0dce47cf8b6ed2f82
(https://gcc.gnu.org/g:1ab88985631dd2c5a5e3b5c0dce47cf8b6ed2f82) to GCC 10.2.0
fixes this problem (also with plain CXXFLAGS="-O3").

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

end of thread, other threads:[~2021-03-04 10:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04  2:19 [Bug c++/99375] New: Segmentation fault in code compiled with -O1 -ftree-loop-vectorize Arfrever.FTA at GMail dot Com
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

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