unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Janneke Nieuwenhuizen <janneke@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 67686@debbugs.gnu.org, Greg Hogan <code@greghogan.com>
Subject: [bug#67686] [PATCH core-updates 1/5] gnu: gcc@11: Update to 11.4.0.
Date: Thu, 07 Dec 2023 21:11:54 +0100	[thread overview]
Message-ID: <8734wd93hx.fsf@gnu.org> (raw)
In-Reply-To: <84287ec2c97471228f0b4e1db1ae14b155bbde88.1701943221.git.ludo@gnu.org> ("Ludovic Courtès"'s message of "Thu, 7 Dec 2023 11:22:44 +0100")

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]

Ludovic Courtès writes:

> From: Greg Hogan <code@greghogan.com>
>
> * gnu/packages/gcc.scm (gcc-11): Update to 11.4.0.
> Remove ‘gcc-10-tree-sra-union-handling.patch’.
> * gnu/local.mk: Delist patch.
> * gnu/packages/patches/gcc-10-tree-sra-union-handling.patch: Delete.

[On core-updates] this patch is still used, I recommend the attatched
squash commit.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-squash-gnu-gcc-11-Update-to-11.4.0.patch --]
[-- Type: text/x-patch, Size: 2876 bytes --]

From aa0896545b283adc2c7451bbccca2b391a5affb8 Mon Sep 17 00:00:00 2001
Message-ID: <aa0896545b283adc2c7451bbccca2b391a5affb8.1701979835.git.janneke@gnu.org>
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Thu, 7 Dec 2023 21:04:31 +0100
Subject: [PATCH] squash! gnu: gcc@11: Update to 11.4.0.

Do not remove and delist this patch, it's still used by gcc-10.

* gnu/packages/patches/gcc-10-tree-sra-union-handling.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Change-Id: Iff8c9151326c87cb13db9c5b1a00c44b8eef95e3
---
 gnu/local.mk                                  |  1 +
 .../gcc-10-tree-sra-union-handling.patch      | 33 +++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 gnu/packages/patches/gcc-10-tree-sra-union-handling.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 7ecc828003..231488a1be 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1250,6 +1250,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gcc-10-cross-environment-variables.patch \
   %D%/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch   \
   %D%/packages/patches/gcc-12-cross-environment-variables.patch \
+  %D%/packages/patches/gcc-10-tree-sra-union-handling.patch	\
   %D%/packages/patches/gcc-11-libstdc++-powerpc.patch           \
   %D%/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch	\
   %D%/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch	\
diff --git a/gnu/packages/patches/gcc-10-tree-sra-union-handling.patch b/gnu/packages/patches/gcc-10-tree-sra-union-handling.patch
new file mode 100644
index 0000000000..aae5fc9f72
--- /dev/null
+++ b/gnu/packages/patches/gcc-10-tree-sra-union-handling.patch
@@ -0,0 +1,33 @@
+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))

base-commit: 941456404cc52da9492836150cbcfa44f6a476e7
-- 
2.41.0


[-- Attachment #3: Type: text/plain, Size: 164 bytes --]


-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com

  reply	other threads:[~2023-12-07 20:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 10:19 [bug#67686] [PATCH core-updates 0/5] Update glibc to 2.38; make C.UTF-8 always available Ludovic Courtès
2023-12-07 10:22 ` [bug#67686] [PATCH core-updates 1/5] gnu: gcc@11: Update to 11.4.0 Ludovic Courtès
2023-12-07 20:11   ` Janneke Nieuwenhuizen [this message]
2023-12-07 21:13     ` Ludovic Courtès
2023-12-07 10:22 ` [bug#67686] [PATCH core-updates 2/5] gnu: glibc-utf8-locales: Generalize and use gexps Ludovic Courtès
2023-12-07 10:22 ` [bug#67686] [PATCH core-updates 3/5] DRAFT gnu: glibc: Update to 2.38 Ludovic Courtès
2023-12-07 10:22 ` [bug#67686] [PATCH core-updates 4/5] gnu: glibc: Install C.UTF-8 locale Ludovic Courtès
2023-12-07 10:30   ` Ludovic Courtès
2023-12-07 20:31     ` Janneke Nieuwenhuizen
2023-12-07 21:12       ` Ludovic Courtès
2023-12-07 21:26     ` Ludovic Courtès
2023-12-09 16:33       ` Efraim Flashner
2023-12-09 21:41         ` Ludovic Courtès
2023-12-10  7:24           ` Efraim Flashner
2023-12-07 10:22 ` [bug#67686] [PATCH core-updates 5/5] gnu: glibc: Ensure C.UTF-8 locale is always found Ludovic Courtès
2023-12-07 22:54 ` [bug#67686] [PATCH core-updates v2 0/7] Update glibc to 2.38; make C.UTF-8 always available Ludovic Courtès
2023-12-07 22:54   ` [bug#67686] [PATCH core-updates v2 1/7] gnu: gcc@11: Update to 11.4.0 Ludovic Courtès
2023-12-08 17:39     ` Janneke Nieuwenhuizen
2023-12-07 22:54   ` [bug#67686] [PATCH core-updates v2 2/7] gnu: glibc-utf8-locales: Generalize and use gexps Ludovic Courtès
2023-12-07 22:54   ` [bug#67686] [PATCH core-updates v2 3/7] gnu: mpfr: Update to 4.2.1 Ludovic Courtès
2023-12-07 22:54   ` [bug#67686] [PATCH core-updates v2 4/7] DRAFT gnu: glibc: Update to 2.38 Ludovic Courtès
2023-12-09 21:44     ` Ludovic Courtès
2023-12-10 10:14       ` Ludovic Courtès
2023-12-07 22:54   ` [bug#67686] [PATCH core-updates v2 5/7] gnu: glibc: Install C.UTF-8 locale Ludovic Courtès
2023-12-07 22:54   ` [bug#67686] [PATCH core-updates v2 6/7] gnu: glibc: Ensure C.UTF-8 locale is always found Ludovic Courtès
2023-12-07 22:54   ` [bug#67686] [PATCH core-updates v2 7/7] gnu: glibc: Improve handling of empty .a files Ludovic Courtès
2023-12-09 14:58   ` bug#67686: [PATCH core-updates v2 0/7] Update glibc to 2.38; make C.UTF-8 always available Ludovic Courtès
2023-12-09 16:37     ` [bug#67686] " Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734wd93hx.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=67686@debbugs.gnu.org \
    --cc=code@greghogan.com \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).