public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/94820] New: pr94780.c fails with ICE on aarch64
@ 2020-04-28 13:25 clyon at gcc dot gnu.org
  2020-04-28 13:31 ` [Bug target/94820] [8/9/10 Regression] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: clyon at gcc dot gnu.org @ 2020-04-28 13:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94820
           Summary: pr94780.c fails with ICE on aarch64
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: clyon at gcc dot gnu.org
  Target Milestone: ---

Hi,

The new gcc.dg/pr94780.c test causes an ICE on aarch64:

/gcc/testsuite/gcc.dg/pr94780.c: In function 'foo':
/gcc/testsuite/gcc.dg/pr94780.c:8:1: internal compiler error: Segmentation
fault
0xd5f4af crash_signal
        /gcc/toplev.c:328
0xe2b238 contains_struct_check
        /gcc/tree.h:3400
0xe2b238 convert_nonlocal_reference_op
        /gcc/tree-nested.c:1065
0x10cf01b walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        /gcc/tree.c:12000
0xa34d93 walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        /gcc/gimple-walk.c:268
0xa355e4 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        /gcc/gimple-walk.c:596
0xa357e8 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        /gcc/gimple-walk.c:51
0xa35682 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        /gcc/gimple-walk.c:606
0xa357e8 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        /gcc/gimple-walk.c:51
0xe23ac1 walk_body
        /gcc/tree-nested.c:713
0xe24508 walk_function
        /gcc/tree-nested.c:724
0xe24508 walk_all_functions
        /gcc/tree-nested.c:789
0xe2a1af lower_nested_functions(tree_node*)
        /gcc/tree-nested.c:3553
0x86f243 cgraph_node::analyze()
        /gcc/cgraphunit.c:676
0x872ae3 analyze_functions
        /gcc/cgraphunit.c:1227
0x8738a2 symbol_table::finalize_compilation_unit()
        /gcc/cgraphunit.c:2974

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

* [Bug target/94820] [8/9/10 Regression] pr94780.c fails with ICE on aarch64
  2020-04-28 13:25 [Bug target/94820] New: pr94780.c fails with ICE on aarch64 clyon at gcc dot gnu.org
@ 2020-04-28 13:31 ` rguenth at gcc dot gnu.org
  2020-04-28 13:51 ` schwab@linux-m68k.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-28 13:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |94780
           Priority|P3                          |P2
   Target Milestone|---                         |8.5
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2020-04-28
            Summary|pr94780.c fails with ICE on |[8/9/10 Regression]
                   |aarch64                     |pr94780.c fails with ICE on
                   |                            |aarch64
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Looks like an exact duplicate of the PR but this time for aarch64.  The fix is
going to be similar (and likely more targets will be affected).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94780
[Bug 94780] [8/9 Regression] ICE in walk_body at gcc/tree-nested.c:713 since
r6-3632-gf6f69fb09c5f81df

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

* [Bug target/94820] [8/9/10 Regression] pr94780.c fails with ICE on aarch64
  2020-04-28 13:25 [Bug target/94820] New: pr94780.c fails with ICE on aarch64 clyon at gcc dot gnu.org
  2020-04-28 13:31 ` [Bug target/94820] [8/9/10 Regression] " rguenth at gcc dot gnu.org
@ 2020-04-28 13:51 ` schwab@linux-m68k.org
  2020-04-29  1:32 ` z.zhanghaijian at huawei dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: schwab@linux-m68k.org @ 2020-04-28 13:51 UTC (permalink / raw)
  To: gcc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |z.zhanghaijian at huawei dot com

--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
*** Bug 94821 has been marked as a duplicate of this bug. ***

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

* [Bug target/94820] [8/9/10 Regression] pr94780.c fails with ICE on aarch64
  2020-04-28 13:25 [Bug target/94820] New: pr94780.c fails with ICE on aarch64 clyon at gcc dot gnu.org
  2020-04-28 13:31 ` [Bug target/94820] [8/9/10 Regression] " rguenth at gcc dot gnu.org
  2020-04-28 13:51 ` schwab@linux-m68k.org
@ 2020-04-29  1:32 ` z.zhanghaijian at huawei dot com
  2020-04-29  8:24 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: z.zhanghaijian at huawei dot com @ 2020-04-29  1:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from z.zhanghaijian at huawei dot com <z.zhanghaijian at huawei dot com> ---
I have an initial fix for aarch64 that is under testing.
Will post to gcc-patches when finished.

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

* [Bug target/94820] [8/9/10 Regression] pr94780.c fails with ICE on aarch64
  2020-04-28 13:25 [Bug target/94820] New: pr94780.c fails with ICE on aarch64 clyon at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-04-29  1:32 ` z.zhanghaijian at huawei dot com
@ 2020-04-29  8:24 ` cvs-commit at gcc dot gnu.org
  2020-04-29 13:05 ` [Bug target/94820] [8/9 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-29  8:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:d81bc2af7d2700888e414eb5a322ff5f5b0df0bb

commit r10-8038-gd81bc2af7d2700888e414eb5a322ff5f5b0df0bb
Author: Haijian Zhang <z.zhanghaijian@huawei.com>
Date:   Wed Apr 29 10:23:11 2020 +0200

    pr94780.c fails with ICE on aarch64 [PR94820]

    This is a simple fix for pr94820.
    The PR was only fixed on i386, the same error was also reported on aarch64.
    This function, because it is sometimes called even outside of function
bodies, uses create_tmp_var_raw rather than create_tmp_var.
    But in order for that to work, when first referenced, the VAR_DECLs need to
appear in a TARGET_EXPR so that during gimplification
    the var gets the right DECL_CONTEXT and is added to local decls. Without
that, e.g. tree-nested.c ICEs on those.

    2020-04-29  Haijian Zhang  <z.zhanghaijian@huawei.com>

            PR target/94820
            * config/aarch64/aarch64-builtins.c
            (aarch64_atomic_assign_expand_fenv): Use TARGET_EXPR instead of
            MODIFY_EXPR for first assignment to fenv_cr, fenv_sr and
            new_fenv_var.

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

* [Bug target/94820] [8/9 Regression] pr94780.c fails with ICE on aarch64
  2020-04-28 13:25 [Bug target/94820] New: pr94780.c fails with ICE on aarch64 clyon at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-04-29  8:24 ` cvs-commit at gcc dot gnu.org
@ 2020-04-29 13:05 ` jakub at gcc dot gnu.org
  2020-09-16 19:21 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-29 13:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[8/9/10 Regression]         |[8/9 Regression] pr94780.c
                   |pr94780.c fails with ICE on |fails with ICE on aarch64
                   |aarch64                     |
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk (so far).

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

* [Bug target/94820] [8/9 Regression] pr94780.c fails with ICE on aarch64
  2020-04-28 13:25 [Bug target/94820] New: pr94780.c fails with ICE on aarch64 clyon at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-04-29 13:05 ` [Bug target/94820] [8/9 " jakub at gcc dot gnu.org
@ 2020-09-16 19:21 ` cvs-commit at gcc dot gnu.org
  2020-09-17 17:38 ` jakub at gcc dot gnu.org
  2020-09-17 17:39 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-16 19:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:029d813ddf3595bfc93bfb4afad645dd033d21bf

commit r9-8889-g029d813ddf3595bfc93bfb4afad645dd033d21bf
Author: Haijian Zhang <z.zhanghaijian@huawei.com>
Date:   Wed Apr 29 10:23:11 2020 +0200

    pr94780.c fails with ICE on aarch64 [PR94820]

    This is a simple fix for pr94820.
    The PR was only fixed on i386, the same error was also reported on aarch64.
    This function, because it is sometimes called even outside of function
bodies, uses create_tmp_var_raw rather than create_tmp_var.
    But in order for that to work, when first referenced, the VAR_DECLs need to
appear in a TARGET_EXPR so that during gimplification
    the var gets the right DECL_CONTEXT and is added to local decls. Without
that, e.g. tree-nested.c ICEs on those.

    2020-04-29  Haijian Zhang  <z.zhanghaijian@huawei.com>

            PR target/94820
            * config/aarch64/aarch64-builtins.c
            (aarch64_atomic_assign_expand_fenv): Use TARGET_EXPR instead of
            MODIFY_EXPR for first assignment to fenv_cr, fenv_sr and
            new_fenv_var.

    (cherry picked from commit d81bc2af7d2700888e414eb5a322ff5f5b0df0bb)

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

* [Bug target/94820] [8/9 Regression] pr94780.c fails with ICE on aarch64
  2020-04-28 13:25 [Bug target/94820] New: pr94780.c fails with ICE on aarch64 clyon at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-09-16 19:21 ` cvs-commit at gcc dot gnu.org
@ 2020-09-17 17:38 ` jakub at gcc dot gnu.org
  2020-09-17 17:39 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-09-17 17:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94820
Bug 94820 depends on bug 94780, which changed state.

Bug 94780 Summary: [8/9 Regression] ICE in walk_body at gcc/tree-nested.c:713 since r6-3632-gf6f69fb09c5f81df
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94780

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

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

* [Bug target/94820] [8/9 Regression] pr94780.c fails with ICE on aarch64
  2020-04-28 13:25 [Bug target/94820] New: pr94780.c fails with ICE on aarch64 clyon at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-09-17 17:38 ` jakub at gcc dot gnu.org
@ 2020-09-17 17:39 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-09-17 17:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 8.5 in r8-10495-g840a91477f0157a5811957b7d866489d519fb77f and by the
above commit for 9.4+ too.

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

end of thread, other threads:[~2020-09-17 17:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 13:25 [Bug target/94820] New: pr94780.c fails with ICE on aarch64 clyon at gcc dot gnu.org
2020-04-28 13:31 ` [Bug target/94820] [8/9/10 Regression] " rguenth at gcc dot gnu.org
2020-04-28 13:51 ` schwab@linux-m68k.org
2020-04-29  1:32 ` z.zhanghaijian at huawei dot com
2020-04-29  8:24 ` cvs-commit at gcc dot gnu.org
2020-04-29 13:05 ` [Bug target/94820] [8/9 " jakub at gcc dot gnu.org
2020-09-16 19:21 ` cvs-commit at gcc dot gnu.org
2020-09-17 17:38 ` jakub at gcc dot gnu.org
2020-09-17 17:39 ` 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).