+2018-03-01 Marek Polacek <polacek@redhat.com>
+
+ PR c++/84639
+ * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
+ alignment in computation.
+
2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
/* Log2 of specified alignment. */
int pow2align = check_user_alignment (align_expr, true);
+ if (pow2align == -1
+ || !check_cxx_fundamental_alignment_constraints (*node, pow2align, flags))
+ {
+ *no_add_attrs = true;
+ return NULL_TREE;
+ }
/* The alignment in bits corresponding to the specified alignment. */
unsigned bitalign = (1U << pow2align) * BITS_PER_UNIT;
unsigned curalign = 0;
unsigned lastalign = 0;
- if (pow2align == -1
- || !check_cxx_fundamental_alignment_constraints (*node, pow2align, flags))
- *no_add_attrs = true;
- else if (is_type)
+ if (is_type)
{
if ((flags & (int) ATTR_FLAG_TYPE_IN_PLACE))
/* OK, modify the type in place. */;