public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sjames at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/112280] [14 regression] ICE building libgcrypt-1.10.2 on s390 (during GIMPLE pass: ccp)
Date: Mon, 30 Oct 2023 08:01:22 +0000	[thread overview]
Message-ID: <bug-112280-4-UCaqRBWzCG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112280-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
Minimised.

```
$ gcc -O3 -c rijndael.i -march=arch13 -mzarch
rijndael.i:30:18: warning: passing argument 1 of ‘buf_put_le64’ makes pointer
from integer without a cast [-Wint-conversion]
   30 |     buf_put_le64(cipher_bulk_ops_t_outbuf_arg, __trans_tmp_5 ^
tweak_lo);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                  |
      |                  int
rijndael.i:8:25: note: expected ‘void *’ but argument is of type ‘int’
    8 | void buf_put_le64(void *_buf, long long val) {
      |                   ~~~~~~^~~~
rijndael.i:32:47: warning: passing argument 1 of ‘buf_put_le64’ makes pointer
from integer without a cast [-Wint-conversion]
   32 |     buf_put_le64(cipher_bulk_ops_t_outbuf_arg + 8, __trans_tmp_2 ^
tweak_hi);
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
      |                                               |
      |                                               int
rijndael.i:8:25: note: expected ‘void *’ but argument is of type ‘int’
    8 | void buf_put_le64(void *_buf, long long val) {
      |                   ~~~~~~^~~~
during GIMPLE pass: ccp
rijndael.i:12:6: internal compiler error: Segmentation fault
   12 | void cipher_bulk_ops_t() {
      |      ^~~~~~~~~~~~~~~~~
0x578bc41b internal_error(char const*, ...)
        ???:0
0x5611d4f6 gen_rtx_SUBREG(machine_mode, rtx_def*, poly_int<1u, unsigned long
long>)
        ???:0
0x56cbfcbb s390_vectorize_vec_perm_const(machine_mode, machine_mode, rtx_def*,
rtx_def*, rtx_def*, vec_perm_indices const&)
        ???:0
0x5656e4b3 can_vec_perm_const_p(machine_mode, machine_mode, vec_perm_indices
const&, bool)
        ???:0
0x57784b87 gimple_simplify_VEC_PERM_EXPR(gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), code_helper, tree_node*, tree_node*, tree_node*, tree_node*)
        ???:0
0x56e5b3cf gimple_simplify(gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), code_helper, tree_node*, tree_node*, tree_node*, tree_node*)
        ???:0
0x56f95e7f gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), tree_node* (*)(tree_node*))
        ???:0
0x562568b1 gimple_fold_stmt_to_constant_1(gimple*, tree_node* (*)(tree_node*),
tree_node* (*)(tree_node*))
        ???:0
0x569fca5f ssa_propagation_engine::simulate_stmt(gimple*)
        ???:0
0x569fcdd3 ssa_propagation_engine::simulate_block(basic_block_def*)
        ???:0
0x569fd411 ssa_propagation_engine::ssa_propagate()
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

```
$ cat rijndael.i
typedef struct {
  long long a;
} bufhelp_u64_t;

int cipher_bulk_ops_t_outbuf_arg, cipher_bulk_ops_t_nblocks,
cipher_bulk_ops_t__buf;
long long cipher_bulk_ops_t___trans_tmp_4;
long long buf_get_le64(int _buf) { return __builtin_bswap64(((bufhelp_u64_t
*)_buf)->a); }
void buf_put_le64(void *_buf, long long val) {
  bufhelp_u64_t *out = _buf;
  out->a = __builtin_bswap64(val);
}
void cipher_bulk_ops_t() {
  long long __trans_tmp_5, __trans_tmp_3, __trans_tmp_2, tweak_lo, tweak_hi,
      tweak_next_lo, tweak_next_hi, carry;
  { __trans_tmp_3 = __builtin_bswap64(cipher_bulk_ops_t__buf); }
  tweak_next_lo = __trans_tmp_3;
  {
    int _buf;
    cipher_bulk_ops_t___trans_tmp_4 = __builtin_bswap64(_buf);
  }
  tweak_next_hi = cipher_bulk_ops_t___trans_tmp_4;
  while (cipher_bulk_ops_t_nblocks) {
    tweak_lo = tweak_next_lo;
    tweak_hi = tweak_next_hi;
    tweak_next_hi = tweak_next_lo = carry;
    {
      __trans_tmp_5 =
          __builtin_bswap64(((bufhelp_u64_t
*)cipher_bulk_ops_t_outbuf_arg)->a);
    }
    buf_put_le64(cipher_bulk_ops_t_outbuf_arg, __trans_tmp_5 ^ tweak_lo);
    __trans_tmp_2 = buf_get_le64(cipher_bulk_ops_t_outbuf_arg + 8);
    buf_put_le64(cipher_bulk_ops_t_outbuf_arg + 8, __trans_tmp_2 ^ tweak_hi);
    cipher_bulk_ops_t_nblocks--;
  }
}
```

  parent reply	other threads:[~2023-10-30  8:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-29 20:48 [Bug target/112280] New: " sjames at gcc dot gnu.org
2023-10-29 20:48 ` [Bug target/112280] " sjames at gcc dot gnu.org
2023-10-29 21:36 ` [Bug target/112280] [14 regression] " sjames at gcc dot gnu.org
2023-10-29 21:36 ` sjames at gcc dot gnu.org
2023-10-30  8:01 ` sjames at gcc dot gnu.org [this message]
2023-10-30 14:10 ` rguenth at gcc dot gnu.org
2023-10-31 17:12 ` sjames at gcc dot gnu.org
2023-11-05 23:20 ` pinskia at gcc dot gnu.org
2023-11-06  2:22 ` pinskia at gcc dot gnu.org
2023-11-28 16:13 ` sjames at gcc dot gnu.org
2024-01-11 14:00 ` rguenth at gcc dot gnu.org
2024-01-12  6:58 ` cvs-commit at gcc dot gnu.org
2024-01-12  6:59 ` rguenth 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-112280-4-UCaqRBWzCG@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).