public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103033] New: [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829
@ 2021-11-01 21:53 seurer at gcc dot gnu.org
  2021-11-02  8:34 ` [Bug tree-optimization/103033] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: seurer at gcc dot gnu.org @ 2021-11-01 21:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103033
           Summary: [12 regression] c-c++-common/auto-init-4.c ICEs
                    starting with r12-4829
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:429e3b7d8bf6609ddf7c7b1e49244997e9ac76b8, r12-4829

make  -k check-gcc RUNTESTFLAGS="dg.exp=c-c++-common/auto-init-4.c"
FAIL: c-c++-common/auto-init-4.c  -Wc++-compat  (internal compiler error)
FAIL: c-c++-common/auto-init-4.c  -Wc++-compat  (test for excess errors)
FAIL: c-c++-common/auto-init-4.c  -std=gnu++98 (internal compiler error)
FAIL: c-c++-common/auto-init-4.c  -std=gnu++98 (test for excess errors)
FAIL: c-c++-common/auto-init-4.c  -std=gnu++14 (internal compiler error)
FAIL: c-c++-common/auto-init-4.c  -std=gnu++14 (test for excess errors)
FAIL: c-c++-common/auto-init-4.c  -std=gnu++17 (internal compiler error)
FAIL: c-c++-common/auto-init-4.c  -std=gnu++17 (test for excess errors)
FAIL: c-c++-common/auto-init-4.c  -std=gnu++2a (internal compiler error)
FAIL: c-c++-common/auto-init-4.c  -std=gnu++2a (test for excess errors)


spawn -ignore SIGHUP /home/seurer/gcc/git/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/git/build/gcc-test/gcc/
/home/seurer/gcc/git/gcc-test/gcc/testsuite/c-c++-common/auto-init-4.c
-fdiagnostics-plain-output -Wc++-compat -ftrivial-auto-var-init=pattern
-fdump-tree-gimple -S -o auto-init-4.s
during RTL pass: expand
/home/seurer/gcc/git/gcc-test/gcc/testsuite/c-c++-common/auto-init-4.c: In
function 'foo':
/home/seurer/gcc/git/gcc-test/gcc/testsuite/c-c++-common/auto-init-4.c:11:15:
internal compiler error: Segmentation fault
0x10bd8533 crash_signal
        /home/seurer/gcc/git/gcc-test/gcc/toplev.c:322
0x10687390 location_wrapper_p(tree_node const*)
        /home/seurer/gcc/git/gcc-test/gcc/tree.h:4136
0x10687390 tree_strip_any_location_wrapper(tree_node*)
        /home/seurer/gcc/git/gcc-test/gcc/tree.h:4148
0x10687390 operand_compare::operand_equal_p(tree_node const*, tree_node const*,
unsigned int)
        /home/seurer/gcc/git/gcc-test/gcc/fold-const.c:2969
0x10682e33 operand_compare::verify_hash_value(tree_node const*, tree_node
const*, unsigned int, bool*)
        /home/seurer/gcc/git/gcc-test/gcc/fold-const.c:3956
0x106875ff operand_compare::verify_hash_value(tree_node const*, tree_node
const*, unsigned int, bool*)
        /home/seurer/gcc/git/gcc-test/gcc/tree.h:4149
0x106875ff operand_compare::operand_equal_p(tree_node const*, tree_node const*,
unsigned int)
        /home/seurer/gcc/git/gcc-test/gcc/fold-const.c:2965
0x106638cf expand_assignment(tree_node*, tree_node*, bool)
        /home/seurer/gcc/git/gcc-test/gcc/expr.c:5366
0x10809b4f expand_DEFERRED_INIT
        /home/seurer/gcc/git/gcc-test/gcc/internal-fn.c:3101
0x10810c4b expand_internal_call(internal_fn, gcall*)
        /home/seurer/gcc/git/gcc-test/gcc/internal-fn.c:4220
0x10810c4b expand_internal_call(gcall*)
        /home/seurer/gcc/git/gcc-test/gcc/internal-fn.c:4228
0x1048c2a7 expand_call_stmt
        /home/seurer/gcc/git/gcc-test/gcc/cfgexpand.c:2749
0x1048c2a7 expand_gimple_stmt_1
        /home/seurer/gcc/git/gcc-test/gcc/cfgexpand.c:3876
0x1048c2a7 expand_gimple_stmt
        /home/seurer/gcc/git/gcc-test/gcc/cfgexpand.c:4040
0x10494dab expand_gimple_basic_block
        /home/seurer/gcc/git/gcc-test/gcc/cfgexpand.c:6085
0x10497d47 execute
        /home/seurer/gcc/git/gcc-test/gcc/cfgexpand.c:6811
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.
compiler exited with status 1


commit 429e3b7d8bf6609ddf7c7b1e49244997e9ac76b8 (HEAD, refs/bisect/bad)
Author: Oracle Public Cloud User
<opc@qinzhao-aarch64-ol8.allregionaliads.osdevelopmeniad.oraclevcn.com>
Date:   Mon Nov 1 15:14:26 2021 +0000

    PR 102281 (-ftrivial-auto-var-init=zero causes ice)

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

* [Bug tree-optimization/103033] [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829
  2021-11-01 21:53 [Bug tree-optimization/103033] New: [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829 seurer at gcc dot gnu.org
@ 2021-11-02  8:34 ` rguenth at gcc dot gnu.org
  2021-11-02  8:40 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-02  8:34 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth 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/103033] [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829
  2021-11-01 21:53 [Bug tree-optimization/103033] New: [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829 seurer at gcc dot gnu.org
  2021-11-02  8:34 ` [Bug tree-optimization/103033] " rguenth at gcc dot gnu.org
@ 2021-11-02  8:40 ` rguenth at gcc dot gnu.org
  2021-11-02 18:06 ` qinzhao at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-02  8:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I can't reproduce this with a cross from x86_64-linux to powerpc64le-linux.

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

* [Bug tree-optimization/103033] [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829
  2021-11-01 21:53 [Bug tree-optimization/103033] New: [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829 seurer at gcc dot gnu.org
  2021-11-02  8:34 ` [Bug tree-optimization/103033] " rguenth at gcc dot gnu.org
  2021-11-02  8:40 ` rguenth at gcc dot gnu.org
@ 2021-11-02 18:06 ` qinzhao at gcc dot gnu.org
  2021-11-02 18:06 ` qinzhao at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: qinzhao at gcc dot gnu.org @ 2021-11-02 18:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from qinzhao at gcc dot gnu.org ---
I can repeat this ICE on the gcc farm machine gcc112, which is a Powerpcle
linux machine with the latest upstream gcc (11/2/2021).


and locate the issue at:
Breakpoint 2, expand_DEFERRED_INIT (stmt=0x3fffaf162c88) at
../../latest_gcc_git/gcc/internal-fn.c:3085
3085              if (can_native_interpret_type_p (var_type))
(gdb) n
3086                init = native_interpret_expr (var_type, buf, total_bytes);
(gdb) n
3105          expand_assignment (lhs, init, false);
(gdb) print init
$8 = (tree) 0x0
(gdb) call debug_tree(var_type)
 <real_type 0x3fffaf0c1500 long double sizes-gimplified TF
    size <integer_cst 0x3fffaf091038 type <integer_type 0x3fffaf0c01f8
bitsizetype> constant 128>
    unit-size <integer_cst 0x3fffaf091050 type <integer_type 0x3fffaf0c0150
sizetype> constant 16>
    align:128 warn_if_not_align:0 symtab:0 alias-set 1 canonical-type
0x3fffaf0c1500 precision:127
    pointer_to_this <pointer_type 0x3fffaf0c1a40>>

i.e, in the above, there is an inconsistency between
"can_native_interpret_type_p" and "native_interpret_expr" for "long double" on
Powerpcle: although "can_native_interpre_type_p(long double)" return true,
"native_interpret_expr (long double, buf,...) return NULL on Powerpcle, This is
due to the following code in "native_interpret_expr":

  if (MODE_COMPOSITE_P (mode))
    {
      /* For floating point values in composite modes, punt if this folding
         doesn't preserve bit representation.  As the mode doesn't have fixed
         precision while GCC pretends it does, there could be valid values that
         GCC can't really represent accurately.  See PR95450.  */
      unsigned char buf[24];
      if (native_encode_expr (ret, buf, total_bytes, 0) != total_bytes
          || memcmp (ptr, buf, total_bytes) != 0)
        ret = NULL_TREE;
    }

this part of the code is to fix PR95450, which is bug on Powerpcle too, so,
looks like this is the reason why this bug only for powerpc.

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

* [Bug tree-optimization/103033] [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829
  2021-11-01 21:53 [Bug tree-optimization/103033] New: [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829 seurer at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-11-02 18:06 ` qinzhao at gcc dot gnu.org
@ 2021-11-02 18:06 ` qinzhao at gcc dot gnu.org
  2021-11-02 18:24 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: qinzhao at gcc dot gnu.org @ 2021-11-02 18:06 UTC (permalink / raw)
  To: gcc-bugs

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

qinzhao at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-11-02

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

* [Bug tree-optimization/103033] [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829
  2021-11-01 21:53 [Bug tree-optimization/103033] New: [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829 seurer at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-11-02 18:06 ` qinzhao at gcc dot gnu.org
@ 2021-11-02 18:24 ` rguenth at gcc dot gnu.org
  2021-11-03 10:13 ` cvs-commit at gcc dot gnu.org
  2021-11-03 10:13 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-02 18:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, that's good enough explanation for a fix.

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

* [Bug tree-optimization/103033] [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829
  2021-11-01 21:53 [Bug tree-optimization/103033] New: [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829 seurer at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-11-02 18:24 ` rguenth at gcc dot gnu.org
@ 2021-11-03 10:13 ` cvs-commit at gcc dot gnu.org
  2021-11-03 10:13 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-03 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 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:c081d0a3b0291297f04a05c833d2ffa8de3a7a1a

commit r12-4859-gc081d0a3b0291297f04a05c833d2ffa8de3a7a1a
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Nov 3 11:10:19 2021 +0100

    middle-end/103033 - drop native_interpret_expr with .DEFERRED_INIT
expansion

    This drops the use of native_interpret_expr which can fail even though
    can_native_interpret_expr_p returns true in favor of simply folding
    the VIEW_CONVERT_EXPR punning.

    2021-11-03  Richard Biener  <rguenther@suse.de>

            PR middle-end/103033
            * internal-fn.c (expand_DEFERRED_INIT): Elide the
            native_interpret_expr path in favor of folding the
            VIEW_CONVERT_EXPR generated when punning the RHS.

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

* [Bug tree-optimization/103033] [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829
  2021-11-01 21:53 [Bug tree-optimization/103033] New: [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829 seurer at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-11-03 10:13 ` cvs-commit at gcc dot gnu.org
@ 2021-11-03 10:13 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-03 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-01 21:53 [Bug tree-optimization/103033] New: [12 regression] c-c++-common/auto-init-4.c ICEs starting with r12-4829 seurer at gcc dot gnu.org
2021-11-02  8:34 ` [Bug tree-optimization/103033] " rguenth at gcc dot gnu.org
2021-11-02  8:40 ` rguenth at gcc dot gnu.org
2021-11-02 18:06 ` qinzhao at gcc dot gnu.org
2021-11-02 18:06 ` qinzhao at gcc dot gnu.org
2021-11-02 18:24 ` rguenth at gcc dot gnu.org
2021-11-03 10:13 ` cvs-commit at gcc dot gnu.org
2021-11-03 10:13 ` 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).