Commit ff67c0a5 by Eric Botcazou Committed by Eric Botcazou

decl.c (make_type_from_size): Do not create integer types with precision 0.

	* gcc-interface/decl.c (make_type_from_size) <INTEGER_TYPE>: Do not
	create integer types with precision 0.

From-SVN: r153722
parent d8e94f79
2009-10-29 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (make_type_from_size) <INTEGER_TYPE>: Do not
create integer types with precision 0.
2009-10-29 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (array_type_has_nonaliased_component): Swap
parameters and rewrite comments. For a derived type, return the
setting of its parent type.
......
......@@ -7737,6 +7737,10 @@ make_type_from_size (tree type, tree size_tree, bool for_biased)
biased_p = (TREE_CODE (type) == INTEGER_TYPE
&& TYPE_BIASED_REPRESENTATION_P (type));
/* Integer types with precision 0 are forbidden. */
if (size == 0)
size = 1;
/* Only do something if the type is not a packed array type and
doesn't already have the proper size. */
if (TYPE_PACKED_ARRAY_TYPE_P (type)
......
2009-10-29 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/pack14.adb: New test.
2009-10-29 David Daney <ddaney@caviumnetworks.com>
* gcc.target/mips/mips.exp (mips_option_groups): Add
......
-- { dg- do compile }
procedure Pack14 is
subtype False_T is Boolean range False .. False;
type Rec is record
F : False_T;
end record;
pragma Pack (Rec);
A : Rec := (F => False);
begin
null;
end;
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