Commit 1b17b994 by Richard Biener Committed by Richard Biener

re PR middle-end/85955 (ICE in fold_convert_loc, at fold-const.c:2408)

2018-06-04  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/85955
	* builtins.c (fold_builtin_sincos): Convert pointers to
	destination to appropriate type before dereferencing.

	* gcc.dg/pr85955.c: New testcase.

From-SVN: r261165
parent 6088d4c4
2018-06-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/85955
* builtins.c (fold_builtin_sincos): Convert pointers to
destination to appropriate type before dereferencing.
2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
......
......@@ -8266,6 +8266,9 @@ fold_builtin_sincos (location_t loc,
call = builtin_save_expr (call);
}
tree ptype = build_pointer_type (type);
arg1 = fold_convert (ptype, arg1);
arg2 = fold_convert (ptype, arg2);
return build2 (COMPOUND_EXPR, void_type_node,
build2 (MODIFY_EXPR, void_type_node,
build_fold_indirect_ref_loc (loc, arg1),
......
2018-06-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/85955
* gcc.dg/pr85955.c: New testcase.
2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85981
......
/* { dg-do compile } */
/* { dg-options "-O2 -w" } */
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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment