From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2188 invoked by alias); 31 Mar 2005 06:30:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2045 invoked by alias); 31 Mar 2005 06:30:41 -0000 Date: Thu, 31 Mar 2005 06:30:00 -0000 Message-ID: <20050331063041.2044.qmail@sourceware.org> From: "ebotcazou at libertysurf dot fr" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050323190354.20607.Ganesh.Sittampalam@arm.com> References: <20050323190354.20607.Ganesh.Sittampalam@arm.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/20607] [3.4 Regression] -fstrict-aliasing causes incorrect scheduling X-Bugzilla-Reason: CC X-SW-Source: 2005-03/txt/msg03530.txt.bz2 List-Id: ------- Additional Comments From ebotcazou at libertysurf dot fr 2005-03-31 06:30 ------- Subject: Re: [3.4 Regression] -fstrict-aliasing causes incorrect scheduling > I think it's fixable. I'm not sure exactly why the C++ front-end is > inserting the additional operations, but they're certainly not essential > from a C++ semantics point of view. Please reassign the bug to me; I'll > try to take a look. Thanks, will do. For the records, here's the tree for the first assignment with the C compiler: unit size align 64 symtab 0 alias set -1 fields DI file ../pr20607.c line 17 size unit size align 64 offset_align 64 offset bit offset context arguments > context > side-effects arg 0 arg 0 used BLK file ../pr20607.c line 31 size unit size align 64 context (mem/s:BLK (plus:SI (reg/f:SI 103 virtual-stack-vars) (const_int -16 [0xfffffffffffffff0])) [8 conv+0 S8 A64])> arg 1 DI file ../pr20607.c line 28 size unit size align 64 offset_align 64 offset bit offset context arguments chain >> arg 1 used DI file ../pr20607.c line 23 size unit size align 64 context (reg/v:DI 107 [ arg1 ]) chain used BLK file ../pr20607.c line 24 size unit size align 64 context (mem/s:BLK (plus:SI (reg/f:SI 103 virtual-stack-vars) (const_int -8 [0xfffffffffffffff8])) [2 result+0 S8 A64])>>> and with the C++ compiler: unit size align 64 symtab 0 alias set 2 fields used nonlocal decl_3 DI file ../pr20607.C line 17 size unit size align 64 offset_align 64 offset bit offset context arguments chain > X() X(constX&) this=(X&) n_parents 0 use_template=0 interface-unknown member-functions elt 2 elt 3 elt 4 > pointer_to_this reference_to_this chain > side-effects arg 0 arg 0 arg 0 arg 0 arg 0 arg 0 arg 0 >>>>>> arg 1 unit size align 64 symtab 0 alias set -1 fields X() X(constX&) this=(X&) n_parents 0 use_template=0 interface-unknown member-functions pointer_to_this reference_to_this > readonly arg 0 arg 0 arg 0 arg 0 >>>>> Type punning needs a COMPONENT_REF to work (see c_common_get_alias_set). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20607