This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/36013] [4.1/4.3/4.4 Regression] Wrong code involving restricted pointers to non-restricted pointers
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Apr 2008 09:21:05 -0000
- Subject: [Bug middle-end/36013] [4.1/4.3/4.4 Regression] Wrong code involving restricted pointers to non-restricted pointers
- References: <bug-36013-9404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from jakub at gcc dot gnu dot org 2008-04-25 09:21 -------
The alias sets seem to be wrong already in the *.expand dump:
(insn 7 6 8 3 pr36013.c:6 (set (reg/f:DI 58 [ D.1430 ])
(mem/f:DI (reg/v/f:DI 59 [ p ]) [4 S8 A64])) -1 (nil))
(insn 8 7 9 3 pr36013.c:6 (set (mem:SI (reg/f:DI 58 [ D.1430 ]) [4 S4 A32])
(const_int 1 [0x1])) -1 (nil))
(insn 9 8 10 3 pr36013.c:7 (set (reg/f:DI 61)
(mem/f:DI (reg/v/f:DI 60 [ q ]) [5 S8 A64])) -1 (nil))
(insn 10 9 11 3 pr36013.c:7 (set (mem:SI (reg/f:DI 61) [3 S4 A32])
(const_int 2 [0x2])) -1 (nil))
(insn 11 10 12 3 pr36013.c:8 (set (reg:CCZ 17 flags)
(compare:CCZ (mem:SI (reg/f:DI 58 [ D.1430 ]) [4 S4 A32])
(const_int 2 [0x2]))) -1 (nil))
(jump_insn 12 11 13 3 pr36013.c:8 (set (pc)
(if_then_else (eq (reg:CCZ 17 flags)
(const_int 0 [0x0]))
(label_ref 16)
(pc))) -1 (expr_list:REG_BR_PROB (const_int 9900 [0x26ac])
(nil)))
Note *p and **p uses the same alias set 4 (bad) and *q uses alias set 5 (that's
ok, it should be different from *p as they can't alias) and **q uses 3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36013