[Bug c/85955] New: ICE in fold_convert_loc, at fold-const.c:2408

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Mon May 28 18:50:00 GMT 2018


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

            Bug ID: 85955
           Summary: ICE in fold_convert_loc, at fold-const.c:2408
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Derived from gcc/testsuite/gcc.dg/torture/pr85567.c, ICE at -O[s23] :


$ cat z1.c
extern void sincos(double x, double *sinx, double *cosx);
void apply(void (*f)(double, double *, double *),
           double x, double *sinx, double *cosx)
{
  f(x, sinx, cosx);
  return;
}
void apply_sincos(double x, double **sinx, double **cosx)
{
  apply(sincos, x, sinx, cosx);
  return;
}


$ gcc-9-20180527 -c z1.c -O2
z1.c: In function 'apply_sincos':
z1.c:10:20: warning: passing argument 3 of 'apply' from incompatible pointer
type [-Wincompatible-pointer-types]
   apply(sincos, x, sinx, cosx);
                    ^~~~
z1.c:3:30: note: expected 'double *' but argument is of type 'double **'
            double x, double *sinx, double *cosx)
                      ~~~~~~~~^~~~
z1.c:10:26: warning: passing argument 4 of 'apply' from incompatible pointer
type [-Wincompatible-pointer-types]
   apply(sincos, x, sinx, cosx);
                          ^~~~
z1.c:3:44: note: expected 'double *' but argument is of type 'double **'
            double x, double *sinx, double *cosx)
                                    ~~~~~~~~^~~~
during GIMPLE pass: einline
z1.c:5:3: internal compiler error: in fold_convert_loc, at fold-const.c:2408
   f(x, sinx, cosx);
   ^~~~~~~~~~~~~~~~
0x87694f fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc/fold-const.c:2407
0x8d36e5 gimplify_modify_expr
        ../../gcc/gimplify.c:5580
0x8ca23b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:11440
0x8cc586 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:6663
0x8cccb7 gimplify_compound_expr
        ../../gcc/gimplify.c:5889
0x8ca215 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:11429
0x8cc586 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:6663
0x8cc5d2 gimplify_and_add(tree_node*, gimple**)
        ../../gcc/gimplify.c:441
0x8a51f2 gimplify_and_update_call_from_tree(gimple_stmt_iterator*, tree_node*)
        ../../gcc/gimple-fold.c:551
0x8ad5aa gimple_fold_builtin
        ../../gcc/gimple-fold.c:3792
0x8b057b gimple_fold_call
        ../../gcc/gimple-fold.c:4158
0x8b057b fold_stmt_1
        ../../gcc/gimple-fold.c:4822
0xb54aef fold_marked_statements
        ../../gcc/tree-inline.c:4977
0xb5ef79 optimize_inline_calls(tree_node*)
        ../../gcc/tree-inline.c:5102
0x11bd3c3 early_inliner(function*)
        ../../gcc/ipa-inline.c:2782


More information about the Gcc-bugs mailing list