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)) 14007af970ebd8f518'>refslogtreecommitdiff
path: root/nix/local.mk
AgeCommit message (Expand)Author
2020-09-17guix-install.sh: Support OpenRC....Morgan Smith
2020-06-27daemon: Remove OpenSSL hash compatibility wrappers....Ludovic Courtès
2020-05-23build: Add a comment above the sysvinit section....Vincent Legoll
2020-05-17etc: Install mount unit only if it exists....Tobias Geerinckx-Rice
2020-05-16etc: Add a systemd unit to bind-mount @storedir@ read-only....Tobias Geerinckx-Rice
2020-03-11Add system start-up files for guix-daemon....Danny Milosavljevic
2019-09-08daemon: Remove 'NIX_LIBEXEC_DIR'....Ludovic Courtès
2019-09-08daemon: Run 'guix substitute' directly and assume a single substituter....Ludovic Courtès
2019-09-08daemon: Run 'guix offload' directly....Ludovic Courtès
2019-09-08daemon: Run 'guix perform-download' directly....Ludovic Courtès
2019-09-08daemon: Run 'guix authenticate' directly....Ludovic Courtès
2019-09-08daemon: Invoke 'guix gc --list-busy' instead of 'list-runtime-roots'....Ludovic Courtès
2019-02-04daemon: Add "/guix" to default 'nixLibexecDir'....Ludovic Courtès
2019-02-04daemon: Remove unused 'NIX_DATA_DIR' environment variable....Ludovic Courtès