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

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
And a similar problem from openssl:

$ cat bn_ctx.i
int BN_CTX_startBN_STACK_push_newsize;

void
memcpy2(void *__dest, void *__src, int __len) {
  long __trans_tmp_1 = __builtin_dynamic_object_size(__dest, 0);
  __builtin___memcpy_chk(__dest, __src, __len, __trans_tmp_1);
}

int *CRYPTO_malloc() __attribute__((alloc_size(1)));

void
BN_CTX_startBN_STACK_push_st() {
  int *newitems = CRYPTO_malloc(BN_CTX_startBN_STACK_push_newsize);
  memcpy2(newitems, BN_CTX_startBN_STACK_push_st, sizeof(int));
}

$ gcc bn_ctx.i -c -m32 -O3 -D_FORTIFY_SOURCE=3
bn_ctx.i: In function ‘BN_CTX_startBN_STACK_push_st’:
bn_ctx.i:12:1: error: non-trivial conversion in ‘ssa_name’
   12 | BN_CTX_startBN_STACK_push_st() {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
unsigned int
int
_6 = BN_CTX_startBN_STACK_push_newsize.2_1;
during GIMPLE pass: objsz
bn_ctx.i:12:1: internal compiler error: verify_gimple failed
0xf97bf5 verify_gimple_in_cfg(function*, bool)
        /home/marxin/Programming/gcc/gcc/tree-cfg.cc:5561
0xe55f3e execute_function_todo
        /home/marxin/Programming/gcc/gcc/passes.cc:2084
0xe5655b execute_todo
        /home/marxin/Programming/gcc/gcc/passes.cc:2138
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to