public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sam at gentoo dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/105573] New: ICE when building numpy on SPARC64
Date: Wed, 11 May 2022 21:57:06 +0000	[thread overview]
Message-ID: <bug-105573-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 105573
           Summary: ICE when building numpy on SPARC64
           Product: gcc
           Version: 11.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sam at gentoo dot org
  Target Milestone: ---

Created attachment 52957
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52957&action=edit
loops.i

Originally reported downstream in Gentoo at https://bugs.gentoo.org/843575 by
Agostino Sarubbo (ago).

Occurs when building numpy 1.22.3 on SPARC64 with GCC 11.3 (but also seen it
with: numpy 1.22.3/gcc 11.2.1_p20220115; numpy 1.21.1/gcc 10.3.0).

I've minimised a reproducer (attached) and can reproduce it myself:
```
$ cat loops.i
UINT_sign_args, UINT_sign_steps;
*UINT_sign_ip1;
__attribute__((optimize("O3"))) UINT_sign() {
  char *op1 = UINT_sign_args;
  int os1 = UINT_sign_steps, i;
  for (; i; i++, op1 += os1) {
    unsigned in = *(unsigned *)UINT_sign_ip1;
    int *out = op1;
    *out = in > 0;
  }
}

$ sparc64-unknown-linux-gnu-gcc -O2 -pipe -mcpu=niagara4 -c loops.i
loops.i:1:1: warning: data definition has no type or storage class
    1 | UINT_sign_args, UINT_sign_steps;
      | ^~~~~~~~~~~~~~
loops.i:1:1: warning: type defaults to ‘int’ in declaration of ‘UINT_sign_args’
[-Wimplicit-int]
loops.i:1:17: warning: type defaults to ‘int’ in declaration of
‘UINT_sign_steps’ [-Wimplicit-int]
    1 | UINT_sign_args, UINT_sign_steps;
      |                 ^~~~~~~~~~~~~~~
loops.i:2:1: warning: data definition has no type or storage class
    2 | *UINT_sign_ip1;
      | ^
loops.i:2:2: warning: type defaults to ‘int’ in declaration of ‘UINT_sign_ip1’
[-Wimplicit-int]
    2 | *UINT_sign_ip1;
      |  ^~~~~~~~~~~~~
loops.i:3:33: warning: return type defaults to ‘int’ [-Wimplicit-int]
    3 | __attribute__((optimize("O3"))) UINT_sign() {
      |                                 ^~~~~~~~~
loops.i: In function ‘UINT_sign’:
loops.i:4:15: warning: initialization of ‘char *’ from ‘int’ makes pointer from
integer without a cast [-Wint-conversion]
    4 |   char *op1 = UINT_sign_args;
      |               ^~~~~~~~~~~~~~
loops.i:8:16: warning: initialization of ‘int *’ from incompatible pointer type
‘char *’ [-Wincompatible-pointer-types]
    8 |     int *out = op1;
      |                ^~~
during GIMPLE pass: isel
loops.i:3:33: internal compiler error: in gimple_expand_vec_cond_expr, at
gimple-isel.cc:267
    3 | __attribute__((optimize("O3"))) UINT_sign() {
      |                                 ^~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
```

Please let me know if you need further information or hardware access (but I've
reproduced this above using a cross-compiler without issues).

             reply	other threads:[~2022-05-11 21:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 21:57 sam at gentoo dot org [this message]
2022-05-11 22:03 ` [Bug target/105573] " sam at gentoo dot org
2022-05-11 22:16 ` mpolacek at gcc dot gnu.org
2022-05-11 22:19 ` pinskia at gcc dot gnu.org
2022-05-11 22:46 ` sam at gentoo dot org
2022-05-11 22:52 ` pinskia at gcc dot gnu.org
2022-05-12 11:34 ` rguenth at gcc dot gnu.org
2022-05-12 15:36 ` sam at gentoo dot org
2022-05-19 14:06 ` rguenth at gcc dot gnu.org
2023-04-25  6:21 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-105573-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).