+2008-01-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * trans.c (gnat_to_gnu) <N_Free_Statement>: Use POINTER_PLUS_EXPR
+ in pointer arithmetics.
+ * utils2.c (build_allocator): Likewise.
+
2008-01-17 Eric Botcazou <ebotcazou@adacore.com>
* utils.c (build_function_stub): Properly build the call expression.
= (void *)GNU_PTR - (void *)sizeof (void *)) */
gnu_ptr
= build_binary_op
- (MINUS_EXPR, ptr_void_type_node,
+ (POINTER_PLUS_EXPR, ptr_void_type_node,
convert (ptr_void_type_node, gnu_ptr),
- convert (ptr_void_type_node,
- TYPE_SIZE_UNIT (ptr_void_type_node)));
+ size_int (-POINTER_SIZE/BITS_PER_UNIT));
/* GNU_PTR (void *) = *(void **)GNU_PTR */
gnu_ptr
front. */
{
tree ptr_addr
- = build_binary_op (MINUS_EXPR, ptr_void_type_node,
+ = build_binary_op (POINTER_PLUS_EXPR, ptr_void_type_node,
convert (ptr_void_type_node, result),
- convert (ptr_void_type_node,
- TYPE_SIZE_UNIT (ptr_void_type_node)));
+ size_int (-POINTER_SIZE/BITS_PER_UNIT));
tree ptr_ref
= convert (build_pointer_type (ptr_void_type_node), ptr_addr);
+2008-01-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/alignment1.ads: New test.
+
2008-01-21 Richard Guenther <rguenther@suse.de>
PR c++/34850
--- /dev/null
+-- { dg-do compile }
+
+package Alignment1 is
+ S : Natural := 20;
+ pragma Volatile (S);
+
+ type Block is array (1 .. S) of Integer;
+ for Block'Alignment use 128;
+
+ B : Block;
+end;