re PR target/27907 (ICE in expand_simple_unop, at optabs.c:2307)

PR rtl-optimization/27907
	* expr.c (force_operand): Use convert_move to handle FLOAT_EXTEND and
	FLOAT_TRUNCATE.

	* gcc.c-torture/compile/pr27907.c: New test.

From-SVN: r115760
This commit is contained in:
Zdenek Dvorak 2006-07-26 18:47:28 +02:00 committed by Zdenek Dvorak
parent bf3fb7e43c
commit e69e3d0e8b
4 changed files with 36 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-07-26 Zdenek Dvorak <dvorakz@suse.cz>
PR rtl-optimization/27907
* expr.c (force_operand): Use convert_move to handle FLOAT_EXTEND and
FLOAT_TRUNCATE.
2006-07-25 Roger Sayle <roger@eyesopen.com>
PR middle-end/28473

View File

@ -6024,6 +6024,8 @@ force_operand (rtx value, rtx target)
case ZERO_EXTEND:
case SIGN_EXTEND:
case TRUNCATE:
case FLOAT_EXTEND:
case FLOAT_TRUNCATE:
convert_move (target, op1, code == ZERO_EXTEND);
return target;

View File

@ -1,3 +1,8 @@
2006-07-26 Zdenek Dvorak <dvorakz@suse.cz>
PR rtl-optimization/27907
* gcc.c-torture/compile/pr27907.c: New test.
2006-07-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* gfortran.dg/mclock.f90: New test.

View File

@ -0,0 +1,23 @@
typedef double fann_type;
typedef struct { } _G_fpos64_t;
struct fann_neuron
{
fann_type value;
}
__attribute__ ((packed));
struct fann_layer
{
struct fann_neuron *last_neuron;
};
struct fann
{
struct fann_layer *first_layer;
};
fann_run (struct fann *ann, fann_type * input)
{
struct fann_layer *layer_it, *layer_it2, *last_layer;
for (layer_it = ann->first_layer + 1; layer_it != last_layer; layer_it++)
{
((layer_it - 1)->last_neuron - 1)->value = 1;
}
}