Commit 1c314335 by H.J. Lu Committed by H.J. Lu

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
parent ddf54e5a
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
......
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.
......
......@@ -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. */
......
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.
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
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