3 if [ $# -eq 3 -a "$2" = '-d' ]; then
5 elif [ $# -ne 1 ]; then
6 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
10 -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
11 -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
13 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
18 # DP: From: David Huggins-Daines <dhuggins@linuxcare.com>
19 Sender: <dhd@thepuffingroup.com>
20 # DP: To: 55263@bugs.debian.org
21 # DP: Subject: Bug#55263: [PATCH] fixed in 2.96 CVS, here's a backport of the diff
22 # DP: Date: Wed, 01 Mar 2000 19:28:03 -0500
26 # DP: I've found the minimal set of optimization flags that will produce
27 # DP: this error (the -O is necessary):
29 # DP: [dhd@doppelbock]:~/src/debian/ncurses4.2-4.2/obj_s$ cc -I../ncurses -I. -DNDEBUG -I. -I../include -DHAVE_CONFIG_H -DTERMINFO=\"/usr/share/terminfo\" -O -fcse-skip-blocks -fexpensive-optimizations -frerun-cse-after-loop -frerun-loop-opt -D_REENTRANT -fPIC -c ../ncurses/softscroll.c
30 # DP: ../ncurses/softscroll.c: In function `_nc_perform_scroll':
31 # DP: ../ncurses/softscroll.c:257: internal error--unrecognizable insn:
33 # DP: (insn 1213 1212 1215 (set (reg/v:DI 531)
34 # DP: (mem/f:DI (symbol_ref:DI ("SP")) 0)) -1 (nil)
37 # DP: However, it seems that the bug is fixed in 2.96 from current CVS.
38 # DP: Here is the diff from 2.95.2 to 2.96 that solves the problem (I've
39 # DP: tested it, it seems to work):
41 --- gcc/emit-rtl.c.2.95.2 Wed Mar 1 18:19:18 2000
42 +++ gcc/emit-rtl.c Wed Mar 1 18:23:29 2000
43 @@ -1856,25 +1728,17 @@
47 - /* A MEM is allowed to be shared if its address is constant
48 - or is a constant plus one of the special registers. */
49 - if (CONSTANT_ADDRESS_P (XEXP (x, 0))
50 - || XEXP (x, 0) == virtual_stack_vars_rtx
51 - || XEXP (x, 0) == virtual_incoming_args_rtx)
52 + /* A MEM is allowed to be shared if its address is constant.
54 + We used to allow sharing of MEMs which referenced
55 + virtual_stack_vars_rtx or virtual_incoming_args_rtx, but
56 + that can lose. instantiate_virtual_regs will not unshare
57 + the MEMs, and combine may change the structure of the address
58 + because it looks safe and profitable in one context, but
59 + in some other context it creates unrecognizable RTL. */
60 + if (CONSTANT_ADDRESS_P (XEXP (x, 0)))
63 - if (GET_CODE (XEXP (x, 0)) == PLUS
64 - && (XEXP (XEXP (x, 0), 0) == virtual_stack_vars_rtx
65 - || XEXP (XEXP (x, 0), 0) == virtual_incoming_args_rtx)
66 - && CONSTANT_ADDRESS_P (XEXP (XEXP (x, 0), 1)))
68 - /* This MEM can appear in more than one place,
69 - but its address better not be shared with anything else. */
71 - XEXP (x, 0) = copy_rtx_if_shared (XEXP (x, 0));
82 David Huggins-Daines, Senior Linux Consultant, Linuxcare, Inc.
84 dhuggins@linuxcare.com, http://www.linuxcare.com/
85 Linuxcare. Support for the revolution.