public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/105056] New: [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31
@ 2022-03-25 14:41 marxin at gcc dot gnu.org
  2022-03-25 14:41 ` [Bug tree-optimization/105056] " marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-25 14:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105056
           Summary: [12 Regression] runtime error: load of value
                    3132799674, which is not a valid value for type
                    'ref_step_type' since r12-7795-g85b4d881327e31
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
            Blocks: 63426
  Target Milestone: ---

Likely caused by r12-7795-g85b4d881327e31:

$ ./xgcc -B.
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c -O2 -c
-funroll-loops --param max-unroll-times=8 -fpredictive-commoning
-fdump-tree-pcom-details
/home/marxin/Programming/gcc/gcc/tree-predcom.cc:670:11: runtime error: load of
value 3132799674, which is not a valid value for type 'ref_step_type'
    #0 0x2b2c965 in dump_component(_IO_FILE*, component*)
(/dev/shm/objdir2/gcc/cc1+0x2b2c965)
    #1 0x2b2ca90 in dump_components(_IO_FILE*, component*)
(/dev/shm/objdir2/gcc/cc1+0x2b2ca90)
    #2 0x2b418bf in pcom_worker::tree_predictive_commoning_loop(bool)
(/dev/shm/objdir2/gcc/cc1+0x2b418bf)
    #3 0x2b42334 in tree_predictive_commoning(bool)
(/dev/shm/objdir2/gcc/cc1+0x2b42334)
    #4 0x2b423f4 in run_tree_predictive_commoning(function*, bool)
(/dev/shm/objdir2/gcc/cc1+0x2b423f4)
    #5 0x2b42644 in (anonymous namespace)::pass_predcom::execute(function*)
(/dev/shm/objdir2/gcc/cc1+0x2b42644)
    #6 0x2323383 in execute_one_pass(opt_pass*)
(/dev/shm/objdir2/gcc/cc1+0x2323383)
    #7 0x2323fa1 in execute_pass_list_1(opt_pass*)
(/dev/shm/objdir2/gcc/cc1+0x2323fa1)
    #8 0x232406a in execute_pass_list_1(opt_pass*)
(/dev/shm/objdir2/gcc/cc1+0x232406a)
    #9 0x232406a in execute_pass_list_1(opt_pass*)
(/dev/shm/objdir2/gcc/cc1+0x232406a)
    #10 0x2324120 in execute_pass_list(function*, opt_pass*)
(/dev/shm/objdir2/gcc/cc1+0x2324120)
    #11 0x124cf08 in cgraph_node::expand() (/dev/shm/objdir2/gcc/cc1+0x124cf08)
    #12 0x124eae8 in expand_all_functions()
(/dev/shm/objdir2/gcc/cc1+0x124eae8)
    #13 0x1251014 in symbol_table::compile()
(/dev/shm/objdir2/gcc/cc1+0x1251014)
    #14 0x1251b32 in symbol_table::finalize_compilation_unit()
(/dev/shm/objdir2/gcc/cc1+0x1251b32)
    #15 0x280e9a1 in compile_file() (/dev/shm/objdir2/gcc/cc1+0x280e9a1)
    #16 0x2818eb8 in do_compile(bool) (/dev/shm/objdir2/gcc/cc1+0x2818eb8)
    #17 0x281990a in toplev::main(int, char**)
(/dev/shm/objdir2/gcc/cc1+0x281990a)
    #18 0x753ec85 in main (/dev/shm/objdir2/gcc/cc1+0x753ec85)
    #19 0x7ffff6f3362f in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
    #20 0x7ffff6f336ef in __libc_start_main_impl ../csu/libc-start.c:392
    #21 0xae1614 in _start (/dev/shm/objdir2/gcc/cc1+0xae1614)

triggers for sanitized compiler.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426
[Bug 63426] [meta-bug] Issues found with -fsanitize=undefined

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

* [Bug tree-optimization/105056] [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31
  2022-03-25 14:41 [Bug tree-optimization/105056] New: [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31 marxin at gcc dot gnu.org
@ 2022-03-25 14:41 ` marxin at gcc dot gnu.org
  2022-03-25 14:42 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-25 14:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug tree-optimization/105056] [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31
  2022-03-25 14:41 [Bug tree-optimization/105056] New: [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31 marxin at gcc dot gnu.org
  2022-03-25 14:41 ` [Bug tree-optimization/105056] " marxin at gcc dot gnu.org
@ 2022-03-25 14:42 ` marxin at gcc dot gnu.org
  2022-03-25 21:43 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-25 14:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-03-25
             Status|UNCONFIRMED                 |NEW

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

* [Bug tree-optimization/105056] [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31
  2022-03-25 14:41 [Bug tree-optimization/105056] New: [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31 marxin at gcc dot gnu.org
  2022-03-25 14:41 ` [Bug tree-optimization/105056] " marxin at gcc dot gnu.org
  2022-03-25 14:42 ` marxin at gcc dot gnu.org
@ 2022-03-25 21:43 ` jakub at gcc dot gnu.org
  2022-03-25 22:10 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-25 21:43 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
2022-03-25  Jakub Jelinek  <jakub@redhat.com>

        PR tree-optimization/105056
        * tree-predcom.cc (component::component): Initialize also comp_step.

--- gcc/tree-predcom.cc.jj      2022-03-24 12:23:11.000000000 +0100
+++ gcc/tree-predcom.cc 2022-03-25 17:50:09.238282600 +0100
@@ -367,7 +367,8 @@ enum ref_step_type

 struct component
 {
-  component (bool es) : eliminate_store_p (es), next (NULL) {}
+  component (bool es) : comp_step (RS_ANY), eliminate_store_p (es),
+    next (NULL) {}

   /* The references in the component.  */
   auto_vec<dref> refs;

(I think RS_ANY is better default than RS_INTERNAL which was previously used
due to zero XCNEW).

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

* [Bug tree-optimization/105056] [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31
  2022-03-25 14:41 [Bug tree-optimization/105056] New: [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-03-25 21:43 ` jakub at gcc dot gnu.org
@ 2022-03-25 22:10 ` pinskia at gcc dot gnu.org
  2022-03-28  6:29 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-03-25 22:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Since we require C++11, why don't we use NSDMI instead and then if another
constructor gets added you don't need to change that constructor also?

e.g.
diff --git a/gcc/tree-predcom.cc b/gcc/tree-predcom.cc
index e4aea7cdcb4..89baf69dc79 100644
--- a/gcc/tree-predcom.cc
+++ b/gcc/tree-predcom.cc
@@ -367,20 +367,20 @@ enum ref_step_type

 struct component
 {
-  component (bool es) : eliminate_store_p (es), next (NULL) {}
+  component (bool es) : eliminate_store_p (es) {}

   /* The references in the component.  */
   auto_vec<dref> refs;

   /* What we know about the step of the references in the component.  */
-  enum ref_step_type comp_step;
+  enum ref_step_type comp_step = RS_ANY;

   /* True if all references in component are stores and we try to do
      intra/inter loop iteration dead store elimination.  */
   bool eliminate_store_p;

   /* Next component in the list.  */
-  struct component *next;
+  struct component *next = NULL;
 };

 /* A class to encapsulate the global states used for predictive

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

* [Bug tree-optimization/105056] [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31
  2022-03-25 14:41 [Bug tree-optimization/105056] New: [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-03-25 22:10 ` pinskia at gcc dot gnu.org
@ 2022-03-28  6:29 ` rguenth at gcc dot gnu.org
  2022-03-28  7:52 ` cvs-commit at gcc dot gnu.org
  2022-03-28  7:53 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-28  6:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Agree with RS_ANY, note the value is always initialized, just the dumping is
done before initializing in filter_suitable_components.  It would be most
appropriate to avoid reading it in the early dumping but initializing to RS_ANY
should be OK (and not confusing in the early dumping).

Mine.

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

* [Bug tree-optimization/105056] [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31
  2022-03-25 14:41 [Bug tree-optimization/105056] New: [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31 marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-03-28  6:29 ` rguenth at gcc dot gnu.org
@ 2022-03-28  7:52 ` cvs-commit at gcc dot gnu.org
  2022-03-28  7:53 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-28  7:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:50f9148f7a8daf1fa1608cb23595c3cca191da0f

commit r12-7840-g50f9148f7a8daf1fa1608cb23595c3cca191da0f
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Mar 28 09:51:28 2022 +0200

    predcom: Fix up component::component [PR105056]

    The recent change didn't initialize comp_step while previously we used
    XCNEW to allocate it.

    I think RS_ANY is better than RS_INTERNAL (== 0) as the default.

    2022-03-28  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/105056
            * tree-predcom.cc (component::component): Initialize also
comp_step.

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

* [Bug tree-optimization/105056] [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31
  2022-03-25 14:41 [Bug tree-optimization/105056] New: [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31 marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-03-28  7:52 ` cvs-commit at gcc dot gnu.org
@ 2022-03-28  7:53 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-28  7:53 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2022-03-28  7:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-25 14:41 [Bug tree-optimization/105056] New: [12 Regression] runtime error: load of value 3132799674, which is not a valid value for type 'ref_step_type' since r12-7795-g85b4d881327e31 marxin at gcc dot gnu.org
2022-03-25 14:41 ` [Bug tree-optimization/105056] " marxin at gcc dot gnu.org
2022-03-25 14:42 ` marxin at gcc dot gnu.org
2022-03-25 21:43 ` jakub at gcc dot gnu.org
2022-03-25 22:10 ` pinskia at gcc dot gnu.org
2022-03-28  6:29 ` rguenth at gcc dot gnu.org
2022-03-28  7:52 ` cvs-commit at gcc dot gnu.org
2022-03-28  7:53 ` jakub 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).