This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c/7010: Bug in 3.1 with inline memcpy


>Number:         7010
>Category:       c
>Synopsis:       Bug in 3.1 with inline memcpy
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 13 01:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Martin Kahlert
>Release:        3.1.1 20020610 (prerelease)
>Organization:
Infineon AG
>Environment:
System: Linux keksy 2.4.18 #9 SMP Thu Mar 14 17:35:28 MET 2002 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-20020610/configure --prefix=/sw/snapshots --enable-languages=f77,c++,java --disable-threads --enable-shared=libstdc++
>Description:
-minline-all-stringops has a problem with memcpy (SegFault).
>How-To-Repeat:
# cat bug.c
#include <string.h>

int main()
{
 char dst[16];
 char src[16];
 int tocopy = 5;

 memcpy (dst+5, src, tocopy);

 return 0;
}

$ gcc -O -minline-all-stringops -o bug bug.c
$ ./bug
>Fix:
Omit -minline-all-stringops from command line.
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]