Check MAX_FIXED_MODE_SIZE on bit-field in C++.

gcc/ada/

2010-06-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/44294
	* gcc-interface/decl.c (MAX_FIXED_MODE_SIZE): Removed.

gcc/cp/

2010-06-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/44294
	* class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
	bit-field.

gcc/

2010-06-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/44294
	* defaults.h (MAX_FIXED_MODE_SIZE): New.

	* stor-layout.c (MAX_FIXED_MODE_SIZE): Removed.

From-SVN: r160229
This commit is contained in:
H.J. Lu 2010-06-03 16:36:22 +00:00 committed by H.J. Lu
parent ddf54e5aa0
commit 1c314335e7
7 changed files with 26 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
PR c++/44294
* defaults.h (MAX_FIXED_MODE_SIZE): New.
* stor-layout.c (MAX_FIXED_MODE_SIZE): Removed.
2010-06-03 Jakub Jelinek <jakub@redhat.com>
PR debug/44375

View File

@ -1,3 +1,8 @@
2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
PR c++/44294
* gcc-interface/decl.c (MAX_FIXED_MODE_SIZE): Removed.
2010-06-01 Arnaud Charlet <charlet@adacore.com>
* gnat_ugn.texi: Improve doc on -fdump-ada-spec, mention limitations.

View File

@ -55,10 +55,6 @@
#include "ada-tree.h"
#include "gigi.h"
#ifndef MAX_FIXED_MODE_SIZE
#define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
#endif
/* Convention_Stdcall should be processed in a specific way on Windows targets
only. The macro below is a helper to avoid having to check for a Windows
specific attribute throughout this unit. */

View File

@ -1,3 +1,9 @@
2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
PR c++/44294
* class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
bit-field.
2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
* parser.c (cp_parser_mem_initializer_list): Change error text.

View File

@ -4976,8 +4976,10 @@ layout_class_type (tree t, tree *virtuals_p)
bits as additional padding. */
for (itk = itk_char; itk != itk_none; ++itk)
if (integer_types[itk] != NULL_TREE
&& INT_CST_LT (DECL_SIZE (field),
TYPE_SIZE (integer_types[itk])))
&& (INT_CST_LT (size_int (MAX_FIXED_MODE_SIZE),
TYPE_SIZE (integer_types[itk]))
|| INT_CST_LT (DECL_SIZE (field),
TYPE_SIZE (integer_types[itk]))))
break;
/* ITK now indicates a type that is too large for the

View File

@ -1165,6 +1165,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X) && GET_CODE (X) != CONST_DOUBLE)
#endif
#ifndef MAX_FIXED_MODE_SIZE
#define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
#endif
#ifdef GCC_INSN_FLAGS_H
/* Dependent default target macro definitions

View File

@ -369,10 +369,6 @@ finalize_size_functions (void)
VEC_free (tree, gc, size_functions);
}
#ifndef MAX_FIXED_MODE_SIZE
#define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
#endif
/* Return the machine mode to use for a nonscalar of SIZE bits. The
mode must be in class MCLASS, and have exactly that many value bits;
it may have padding as well. If LIMIT is nonzero, modes of wider