This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix alpha c++ failures
- To: gcc-patches at gcc dot gnu dot org
- Subject: fix alpha c++ failures
- From: Richard Henderson <rth at redhat dot com>
- Date: Sun, 8 Jul 2001 09:03:02 -0700
For the last week or so, alpha has been failing all c++ tests with
z.c:63: sorry, not implemented: `template_type_parm' not supported by
dump_type_suffix
This was caused by dump_type_suffix being miscompiled by
Mon Jun 18 17:26:56 CEST 2001 Jan Hubicka <jh@suse.cz>
* stmt.c (emit_case_nodes): Optimize test whether index is in given
interval.
The problem is that this patch didn't pay attention to
mode conversions, as the surrounding code does.
Bootstrapped and tested on alphaev6 and i686 linux.
r~
* stmt.c (emit_case_nodes): Convert modes properly in low+high test.
Index: stmt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/stmt.c,v
retrieving revision 1.200
diff -c -p -d -r1.200 stmt.c
*** stmt.c 2001/06/18 15:35:46 1.200
--- stmt.c 2001/07/08 15:57:12
*************** emit_case_nodes (index, node, default_la
*** 6321,6339 ****
}
else if (!low_bound && !high_bound)
{
! /* Instead of doing two branches emit test (index-low) <= (high-low). */
tree new_bound = fold (build (MINUS_EXPR, index_type, node->high,
node->low));
rtx new_index;
new_index = expand_binop (mode, sub_optab, index,
! expand_expr (node->low, NULL_RTX,
! VOIDmode, 0),
! NULL_RTX, 0, OPTAB_WIDEN);
emit_cmp_and_jump_insns (new_index,
! expand_expr (new_bound, NULL_RTX,
! VOIDmode, 0),
GT, NULL_RTX, mode, 1, 0,
default_label);
}
--- 6321,6344 ----
}
else if (!low_bound && !high_bound)
{
! /* Instead of doing two branches, emit
! (index-low) <= (high-low). */
tree new_bound = fold (build (MINUS_EXPR, index_type, node->high,
node->low));
rtx new_index;
new_index = expand_binop (mode, sub_optab, index,
! convert_modes (mode, imode,
! expand_expr (node->low, NULL_RTX,
! mode, 0),
! unsignedp),
! NULL_RTX, unsignedp, OPTAB_WIDEN);
emit_cmp_and_jump_insns (new_index,
! convert_modes (mode, imode,
! expand_expr (new_bound, NULL_RTX,
! mode, 0),
! unsignedp),
GT, NULL_RTX, mode, 1, 0,
default_label);
}