Fix a regression in GCC 10/11/12 where some union structures could get miscompiled when optimizations are enabled: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105860 Taken from upstream: https://gcc.gnu.org/g:16afe2e2862f3dd93c711d7f8d436dee23c6c34d diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 09d951a261b..420329f63f6 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1647,7 +1647,18 @@ build_ref_for_offset (location_t loc, tree base, poly_int64 offset, static tree build_reconstructed_reference (location_t, tree base, struct access *model) { - tree expr = model->expr, prev_expr = NULL; + tree expr = model->expr; + /* We have to make sure to start just below the outermost union. */ + tree start_expr = expr; + while (handled_component_p (expr)) + { + if (TREE_CODE (TREE_TYPE (TREE_OPERAND (expr, 0))) == UNION_TYPE) + start_expr = expr; + expr = TREE_OPERAND (expr, 0); + } + + expr = start_expr; + tree prev_expr = NULL_TREE; while (!types_compatible_p (TREE_TYPE (expr), TREE_TYPE (base))) { if (!handled_component_p (expr)) ix/refs/?id=2c5bba139237bb19ab4061452eeb3e7fdcdb1142'>refslogtreecommitdiff
path: root/gnu/packages/text-editors.scm
AgeCommit message (Expand)Author
2021-06-04gnu: qemacs: Use 'native-inputs' instead of '%build-inputs'....In build phases, the former (or 'inputs', as appropriate) is preferred. * gnu/packages/text-editors.scm (qemacs)[arguments]<#:phases>{install-extra-documentation}: Use 'native-inputs' argument instead of '%build-inputs'. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Maxime Devos
2021-05-31gnu: texmacs: Update to 1.99.21....* gnu/packages/text-editors.scm (texmacs): Update to 1.99.21. Nicolas Goaziou
2021-05-07gnu: texmacs: Update to 1.99.20....* gnu/packages/text-editors.scm (texmacs): Update to 1.99.20. Nicolas Goaziou
2021-05-07gnu: manuskript: Update to 0.12.0....* gnu/packages/text-editors.scm (manuskript): Update to 0.12.0. Nicolas Goaziou