fold-const.c (size_binop): Don't asert inputs are the same and have TYPE_IS_SIZETYPE set.
* fold-const.c (size_binop): Don't asert inputs are the same and have TYPE_IS_SIZETYPE set. (size_diffop): Likewise. From-SVN: r32273
This commit is contained in:
parent
aa1e6de60c
commit
38769add25
@ -1,3 +1,9 @@
|
|||||||
|
2000-02-29 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
* fold-const.c (size_binop): Don't asert inputs are the same and
|
||||||
|
have TYPE_IS_SIZETYPE set.
|
||||||
|
(size_diffop): Likewise.
|
||||||
|
|
||||||
2000-02-29 Jason Merrill <jason@casey.cygnus.com>
|
2000-02-29 Jason Merrill <jason@casey.cygnus.com>
|
||||||
|
|
||||||
* dwarfout.c (output_block): Output abstract blocks even if they
|
* dwarfout.c (output_block): Output abstract blocks even if they
|
||||||
|
@ -1868,8 +1868,8 @@ size_binop (code, arg0, arg1)
|
|||||||
{
|
{
|
||||||
tree type = TREE_TYPE (arg0);
|
tree type = TREE_TYPE (arg0);
|
||||||
|
|
||||||
if (type != TREE_TYPE (arg1)
|
if (TREE_CODE (type) != INTEGER_TYPE
|
||||||
|| TREE_CODE (type) != INTEGER_TYPE || ! TYPE_IS_SIZETYPE (type))
|
|| TREE_CODE (TREE_TYPE (arg1)) != INTEGER_TYPE)
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
/* Handle the special case of two integer constants faster. */
|
/* Handle the special case of two integer constants faster. */
|
||||||
@ -1905,8 +1905,8 @@ size_diffop (arg0, arg1)
|
|||||||
tree type = TREE_TYPE (arg0);
|
tree type = TREE_TYPE (arg0);
|
||||||
tree ctype;
|
tree ctype;
|
||||||
|
|
||||||
if (TREE_TYPE (arg1) != type || TREE_CODE (type) != INTEGER_TYPE
|
if (TREE_CODE (type) != INTEGER_TYPE
|
||||||
|| ! TYPE_IS_SIZETYPE (type))
|
|| TREE_CODE (TREE_TYPE (arg1)) != INTEGER_TYPE)
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
/* If the type is already signed, just do the simple thing. */
|
/* If the type is already signed, just do the simple thing. */
|
||||||
|
11
gcc/testsuite/g++.old-deja/g++.other/crash13.C
Normal file
11
gcc/testsuite/g++.old-deja/g++.other/crash13.C
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
struct Base_bitset {
|
||||||
|
unsigned M_w[2];
|
||||||
|
void M_do_right_shift();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void Base_bitset::M_do_right_shift ()
|
||||||
|
{
|
||||||
|
unsigned n = 0;
|
||||||
|
M_w[0] = M_w[n + 1] ;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user