From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27798 invoked by alias); 25 Aug 2005 15:54:31 -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 27666 invoked by alias); 25 Aug 2005 15:53:50 -0000 Date: Thu, 25 Aug 2005 16:11:00 -0000 Message-ID: <20050825155350.27665.qmail@sourceware.org> From: "pinskia at physics dot uc dot edu" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050825153435.23561.jakub@gcc.gnu.org> References: <20050825153435.23561.jakub@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug rtl-optimization/23561] nonoverlapping_memrefs_p returns true even for overlapping memory references X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg02925.txt.bz2 List-Id: ------- Additional Comments From pinskia at physics dot uc dot edu 2005-08-25 15:53 ------- Subject: Re: nonoverlapping_memrefs_p returns true even for overlapping memory references > > > ------- Additional Comments From jakub at gcc dot gnu dot org 2005-08-25 15:47 ------- > > That is invalid as a.a2 is only 5 in size and "HELLO" is 6 in size. > I know it overlaps into the next field. Whether it is invalid is unclear to me. > How about memcpy ((char *) &a + offsetof (struct A, a2), "HELLO", 6)? > Is there supposed to be any semantic difference between the 2? yes because one talks about the object a and the other one talks about the object a.a2. This is at least as I understand what the C standard says. -- Pinski -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23561