public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/96028] New: SEGV in vect_create_constant_vectors
@ 2020-07-02  9:18 ro at gcc dot gnu.org
  2020-07-02  9:19 ` [Bug tree-optimization/96028] " ro at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ro at gcc dot gnu.org @ 2020-07-02  9:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96028
           Summary: SEGV in vect_create_constant_vectors
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---
              Host: sparc-sun-solaris2.11
            Target: sparc-sun-solaris2.11
             Build: sparc-sun-solaris2.11

The new gcc.dg/torture/pr95761.c test causes an ICE on 64-bit Solaris/SPARC:

+FAIL: gcc.dg/torture/pr95761.c   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions  (internal compiler error)
+FAIL: gcc.dg/torture/pr95761.c   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions  (test for excess errors)
+FAIL: gcc.dg/torture/pr95761.c   -O3 -g  (internal compiler error)
+FAIL: gcc.dg/torture/pr95761.c   -O3 -g  (test for excess errors)

Excess errors:
during GIMPLE pass: slp
/vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/torture/pr95761.c:12:6:
internal compiler error: Segmentation Fault
0xc55d0b crash_signal
        /vol/gcc/src/hg/master/local/gcc/toplev.c:328
0xf86164 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        /vol/gcc/src/hg/master/local/gcc/tree.h:3414
0xf86164 vect_create_constant_vectors
        /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:3699
0xf86d4f vect_schedule_slp_instance
        /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:4314
0xf86d4f vect_schedule_slp_instance
        /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:4314
0xf8f14f vect_schedule_slp(vec_info*)
        /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:4554
0xf9002f vect_slp_bb_region
        /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:3379
0xf9002f vect_slp_bb(basic_block_def*)
        /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:3509
0xf91e0f execute
        /vol/gcc/src/hg/master/local/gcc/tree-vectorizer.c:1384

Can be reproduced with

$ cc1 -fpreprocessed pr95761.i -quiet -m64 -O3 -o pr95761.s

gdb shows
Thread 2 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
vect_create_constant_vectors (vinfo=0x1bc5f38, op_node=<optimized out>)
    at /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:3699
3699              if (!types_compatible_p (TREE_TYPE (vector_type), TREE_TYPE
(op)))
(gdb) p vector_type
$1 = <vector_type 0xfa8835c0>
(gdb) p op
$2 = <tree 0x0>
(gdb) where
#0  vect_create_constant_vectors (vinfo=0x1bc5f38, op_node=<optimized out>)
    at /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:3699
#1  0x00f86d50 in vect_schedule_slp_instance (vinfo=0x1bc5f38, node=0x1beab48, 
    instance=0x1a95680)
    at /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:4314
#2  0x00f86d50 in vect_schedule_slp_instance (vinfo=0x1bc5f38, node=0x1bea748, 
    instance=0x1a95680)
    at /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:4314
#3  0x00f8f150 in vect_schedule_slp (vinfo=0x1bc5f38)
    at /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:4554
#4  0x00f90030 in vect_slp_bb_region (n_stmts=<optimized out>, datarefs=..., 
    region_end=..., region_begin=...)
    at /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:3379
#5  vect_slp_bb (bb=<optimized out>)
    at /vol/gcc/src/hg/master/local/gcc/tree-vect-slp.c:3509
#6  0x00f91e10 in (anonymous namespace)::pass_slp_vectorize::execute (
    this=<optimized out>, fun=0xfa8ac000)
    at /vol/gcc/src/hg/master/local/gcc/tree-vectorizer.c:1384
#7  0x00b4264c in execute_one_pass (pass=<opt_pass* 0x1a9c8b0 "slp"(172)>)
    at /vol/gcc/src/hg/master/local/gcc/passes.c:2502
#8  0x00b430f4 in execute_pass_list_1 (pass=<opt_pass* 0x1a9c8b0 "slp"(172)>)
    at /vol/gcc/src/hg/master/local/gcc/passes.c:2590
#9  0x00b43118 in execute_pass_list_1 (pass=<opt_pass* 0x1a9c268 "loop"(147)>)
    at /vol/gcc/src/hg/master/local/gcc/passes.c:2591
#10 0x00b43118 in execute_pass_list_1 (pass=<opt_pass* 0x1a9b590
"*all_optimizations"(-1)>) at /vol/gcc/src/hg/master/local/gcc/passes.c:2591
#11 0x00b4316c in execute_pass_list (fn=0xfa8ac000, pass=<opt_pass* 0x1a9b410
"fixup_cfg"(94)>) at /vol/gcc/src/hg/master/local/gcc/passes.c:2601
#12 0x006dbd48 in cgraph_node::expand (this=<cgraph_node * const 0xfa8100d8
"k"/2>) at /vol/gcc/src/hg/master/local/gcc/context.h:48
#13 0x006dd548 in expand_all_functions () at
/vol/gcc/src/hg/master/local/gcc/cgraphunit.c:2472
#14 symbol_table::compile (this=0xfa810000) at
/vol/gcc/src/hg/master/local/gcc/cgraphunit.c:2823
#15 0x006e092c in symbol_table::compile (this=0xfa810000) at
/vol/gcc/src/hg/master/local/gcc/cgraphunit.c:3003
#16 symbol_table::finalize_compilation_unit (this=0xfa810000) at
/vol/gcc/src/hg/master/local/gcc/cgraphunit.c:3003
#17 0x00c56218 in compile_file () at
/vol/gcc/src/hg/master/local/gcc/toplev.c:483
#18 0x00c58b9c in do_compile () at
/vol/gcc/src/hg/master/local/gcc/toplev.c:2307
#19 toplev::main (this=0xffbfe97e, argc=<optimized out>, argv=<optimized out>)
at /vol/gcc/src/hg/master/local/gcc/toplev.c:2446
#20 0x015fed9c in main (argc=8, argv=0xffbfe9e4) at
/vol/gcc/src/hg/master/local/gcc/main.c:39

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

* [Bug tree-optimization/96028] SEGV in vect_create_constant_vectors
  2020-07-02  9:18 [Bug tree-optimization/96028] New: SEGV in vect_create_constant_vectors ro at gcc dot gnu.org
@ 2020-07-02  9:19 ` ro at gcc dot gnu.org
  2020-07-02  9:22 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ro at gcc dot gnu.org @ 2020-07-02  9:19 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0

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

* [Bug tree-optimization/96028] SEGV in vect_create_constant_vectors
  2020-07-02  9:18 [Bug tree-optimization/96028] New: SEGV in vect_create_constant_vectors ro at gcc dot gnu.org
  2020-07-02  9:19 ` [Bug tree-optimization/96028] " ro at gcc dot gnu.org
@ 2020-07-02  9:22 ` rguenth at gcc dot gnu.org
  2020-07-02  9:27 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-02  9:22 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2020-07-02
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'll have a look with a cross.

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

* [Bug tree-optimization/96028] SEGV in vect_create_constant_vectors
  2020-07-02  9:18 [Bug tree-optimization/96028] New: SEGV in vect_create_constant_vectors ro at gcc dot gnu.org
  2020-07-02  9:19 ` [Bug tree-optimization/96028] " ro at gcc dot gnu.org
  2020-07-02  9:22 ` rguenth at gcc dot gnu.org
@ 2020-07-02  9:27 ` rguenth at gcc dot gnu.org
  2020-07-02  9:29 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-02  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Do I need some special flags?

> /tmp/obj/gcc/xgcc -B/tmp/obj/gcc/ /home/rguenther/src/gcc3/gcc/testsuite/gcc.dg/torture/pr95761.c    -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never  -fdiagnostics-urls=never    -O0   -S -o pr95761.s -O3 -g -v
Reading specs from /tmp/obj/gcc/specs
COLLECT_GCC=/tmp/obj/gcc/xgcc
Target: sparc-sun-solaris2.11
Configured with: /home/rguenther/src/gcc3/configure
--target=sparc-sun-solaris2.11
...
 /tmp/obj/gcc/cc1 -quiet -v -iprefix
/tmp/obj/gcc/../lib64/gcc/sparc-sun-solaris2.11/11.0.0/ -isystem
/tmp/obj/gcc/include -isystem /tmp/obj/gcc/include-fixed -D__sparcv8
/home/rguenther/src/gcc3/gcc/testsuite/gcc.dg/torture/pr95761.c -quiet
-dumpbase pr95761.c -dumpbase-ext .c -mcpu=v9 -g -O0 -O3 -version
-fdiagnostics-color=never -fno-diagnostics-show-caret
-fno-diagnostics-show-line-numbers -fdiagnostics-urls=never -o pr95761.s
<OK>

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

* [Bug tree-optimization/96028] SEGV in vect_create_constant_vectors
  2020-07-02  9:18 [Bug tree-optimization/96028] New: SEGV in vect_create_constant_vectors ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-07-02  9:27 ` rguenth at gcc dot gnu.org
@ 2020-07-02  9:29 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2020-07-02  9:32 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2020-07-02  9:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
> Do I need some special flags?

The -m64 is crucial: the test PASSes for me for the default -m32.

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

* [Bug tree-optimization/96028] SEGV in vect_create_constant_vectors
  2020-07-02  9:18 [Bug tree-optimization/96028] New: SEGV in vect_create_constant_vectors ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-07-02  9:29 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2020-07-02  9:32 ` rguenth at gcc dot gnu.org
  2020-07-02  9:52 ` [Bug tree-optimization/96028] [11 Regression] " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-02  9:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #3)
> > --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
> > Do I need some special flags?
> 
> The -m64 is crucial: the test PASSes for me for the default -m32.

Ah, that was it!

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

* [Bug tree-optimization/96028] [11 Regression] SEGV in vect_create_constant_vectors
  2020-07-02  9:18 [Bug tree-optimization/96028] New: SEGV in vect_create_constant_vectors ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-07-02  9:32 ` rguenth at gcc dot gnu.org
@ 2020-07-02  9:52 ` rguenth at gcc dot gnu.org
  2020-07-02 12:38 ` cvs-commit at gcc dot gnu.org
  2020-07-02 12:39 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-02  9:52 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|SEGV in                     |[11 Regression] SEGV in
                   |vect_create_constant_vector |vect_create_constant_vector
                   |s                           |s

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Patch in testing.

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

* [Bug tree-optimization/96028] [11 Regression] SEGV in vect_create_constant_vectors
  2020-07-02  9:18 [Bug tree-optimization/96028] New: SEGV in vect_create_constant_vectors ro at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-07-02  9:52 ` [Bug tree-optimization/96028] [11 Regression] " rguenth at gcc dot gnu.org
@ 2020-07-02 12:38 ` cvs-commit at gcc dot gnu.org
  2020-07-02 12:39 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-02 12:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:105ecbea5f402713130fef4d41bb000e2d23493b

commit r11-1788-g105ecbea5f402713130fef4d41bb000e2d23493b
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Jul 2 11:45:06 2020 +0200

    tree-optimization/96028 - fix bogus externalizing of SLP node

    This guards externalizing a SLP node when it fails to code generate
    to actually have scalar defs we can use.  It also makes failure
    to do so not fell the whole SLP instance but instead try this again
    on the parent.

    2020-07-02  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/96028
            * tree-vect-slp.c (vect_slp_convert_to_external): Make sure
            we have scalar stmts to use.
            (vect_slp_analyze_node_operations): When analyzing a child
            failed try externalizing the parent node.

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

* [Bug tree-optimization/96028] [11 Regression] SEGV in vect_create_constant_vectors
  2020-07-02  9:18 [Bug tree-optimization/96028] New: SEGV in vect_create_constant_vectors ro at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-07-02 12:38 ` cvs-commit at gcc dot gnu.org
@ 2020-07-02 12:39 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-02 12:39 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2020-07-02 12:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02  9:18 [Bug tree-optimization/96028] New: SEGV in vect_create_constant_vectors ro at gcc dot gnu.org
2020-07-02  9:19 ` [Bug tree-optimization/96028] " ro at gcc dot gnu.org
2020-07-02  9:22 ` rguenth at gcc dot gnu.org
2020-07-02  9:27 ` rguenth at gcc dot gnu.org
2020-07-02  9:29 ` ro at CeBiTec dot Uni-Bielefeld.DE
2020-07-02  9:32 ` rguenth at gcc dot gnu.org
2020-07-02  9:52 ` [Bug tree-optimization/96028] [11 Regression] " rguenth at gcc dot gnu.org
2020-07-02 12:38 ` cvs-commit at gcc dot gnu.org
2020-07-02 12:39 ` rguenth at gcc dot gnu.org

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