Hello.

I noticed the change that was backported to gcc-11 breaks LTO bytecode
due to the addition of the new parameter:

./lto1 -quiet -dumpbase ./a.wpa -mtune=generic -march=x86-64 -O2 -version 
-fno-openmp -fno-openacc -fno-pie -fcf-protection=none 
-fltrans-output-list=./a.ltrans.out -fwpa -fresolution=a.res 
-flinker-output=exec @./a.wpa.args.0
GNU GIMPLE (GCC) version 11.2.1 20220329 (x86_64-pc-linux-gnu)
        compiled by GNU C version 11.2.1 20220316 [revision 
6a1150d1524aeda3381b2171712e1a6611d441d6], GMP version 6.2.1, MPFR version 
4.1.0-p7, MPC version 1.2.1, isl version isl-0.24-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU GIMPLE (GCC) version 11.2.1 20220329 (x86_64-pc-linux-gnu)
        compiled by GNU C version 11.2.1 20220316 [revision 
6a1150d1524aeda3381b2171712e1a6611d441d6], GMP version 6.2.1, MPFR version 
4.1.0-p7, MPC version 1.2.1, isl version isl-0.24-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
lto1: internal compiler error: Segmentation fault
0x10c6e9e crash_signal
        /home/marxin/Programming/gcc2/gcc/toplev.c:327
0x7ffff78b93cf ???
        
/usr/src/debug/glibc-2.35-2.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0xb2664b bp_unpack_string(data_in*, bitpack_d*)
        /home/marxin/Programming/gcc2/gcc/data-streamer-in.c:112
0xf68898 cl_optimization_stream_in(data_in*, bitpack_d*, cl_optimization*)
        /dev/shm/objdir2/gcc/options-save.c:12787
0x1392f33 streamer_read_tree_bitfields(lto_input_block*, data_in*, tree_node*)
        /home/marxin/Programming/gcc2/gcc/tree-streamer-in.c:552
0xeb7456 lto_read_tree_1
...

I'm going to bump it.

Cheers,
Martin
From 71aa6e9c36c6948a4de67720a0e9f368ce696f4e Mon Sep 17 00:00:00 2001
From: Martin Liska <mli...@suse.cz>
Date: Wed, 30 Mar 2022 10:02:59 +0200
Subject: [PATCH] LTO: bump bytecode version

The following revision 91f7d7e1bb6827bf8e0b7ba7eb949953a5b1bd18
breaks bytecode as it introduces a new param.

gcc/ChangeLog:

	* lto-streamer.h (LTO_minor_version): Bump it.
---
 gcc/lto-streamer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h
index e2a0e033ab2..db17b764957 100644
--- a/gcc/lto-streamer.h
+++ b/gcc/lto-streamer.h
@@ -121,7 +121,7 @@ along with GCC; see the file COPYING3.  If not see
      form followed by the data for the string.  */
 
 #define LTO_major_version 11
-#define LTO_minor_version 2
+#define LTO_minor_version 3
 
 typedef unsigned char	lto_decl_flags_t;
 
-- 
2.35.1

Reply via email to