https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68273
--- Comment #32 from Hector Oron <hector.oron at gmail dot com> ---
(In reply to Richard Biener from comment #31)
> eipa_sra introduces the remaining SSA name with non-default alignment via
[PATCH]
> it would be nice to see this IL checking on trunk and thus results from
> testing on affected targets - I'll give it a try in x86_64.
I have backported the patch to 5.3.1, which I am using.. and applying the
following patch based on yours, dot does not fail here anymore.
I also have a gcc built with tests, which I'll try to submit to relevant
mailing list.
Extending already commited patch from comment #20 with:
Index: gcc-5-5.3.1/src/gcc/tree-sra.c
===================================================================
--- gcc-5-5.3.1.orig/src/gcc/tree-sra.c
+++ gcc-5-5.3.1/src/gcc/tree-sra.c
@@ -936,7 +936,7 @@ create_access (tree expr, gimple stmt, b
access = create_access_1 (base, offset, size);
access->expr = expr;
- access->type = TREE_TYPE (expr);
+ access->type = TYPE_MAIN_VARIANT (TREE_TYPE (expr));
access->write = write;
access->grp_unscalarizable_region = unscalarizable_region;
access->stmt = stmt;
@@ -1026,7 +1026,7 @@ completely_scalarize_var (tree var)
access = create_access_1 (var, 0, size);
access->expr = var;
- access->type = TREE_TYPE (var);
+ access->type = TYPE_MAIN_VARIANT (TREE_TYPE (var));
access->grp_total_scalarization = 1;
completely_scalarize_record (var, var, 0, var);
Index: gcc-5-5.3.1/src/gcc/tree-ssa.c
===================================================================
--- gcc-5-5.3.1.orig/src/gcc/tree-ssa.c
+++ gcc-5-5.3.1/src/gcc/tree-ssa.c
@@ -965,6 +965,14 @@ verify_ssa (bool check_modified_stmt, bo
name, stmt, virtual_operand_p (name)))
goto err;
}
+
+ if (TYPE_ALIGN (TREE_TYPE (name))
+ != TYPE_ALIGN (TYPE_MAIN_VARIANT (TREE_TYPE (name))))
+ {
+ error ("type with non-default alignment");
+ goto err;
+ }
+
}
}