This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/48175] New: [x32] FAIL: gcc.c-torture/execute/builtins/strcat.c
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 Mar 2011 00:45:33 +0000
- Subject: [Bug middle-end/48175] New: [x32] FAIL: gcc.c-torture/execute/builtins/strcat.c
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48175
Summary: [x32] FAIL: gcc.c-torture/execute/builtins/strcat.c
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
[hjl@gnu-33 gcc]$ cat /tmp/x.c
extern void abort (void);
typedef __SIZE_TYPE__ size_t;
extern char *strcat (char *, const char *);
extern char *strcpy (char *, const char *);
extern void *memset (void *, int, size_t);
extern int memcmp (const void *, const void *, size_t);
#define RESET_DST_WITH(FILLER) \
do { memset (dst, 'X', sizeof (dst)); strcpy (dst, (FILLER)); } while (0)
void main_test (void)
{
const char *const s1 = "hello world";
const char *const s2 = "";
char dst[64], *d2;
RESET_DST_WITH (s1);
strcat (strcat (strcat (strcat (strcat (strcat (dst, ": this "), ""),
"is "), "a "), "test"), ".");
if (memcmp (dst, "hello world: this is a test.\0X", 30))
abort();
}
[hjl@gnu-33 gcc]$ ./xgcc -B./ -S -mx32 -O1 /tmp/x.c
/tmp/x.c: In function âmain_testâ:
/tmp/x.c:22:1: internal compiler error: in change_address_1, at emit-rtl.c:1933
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-33 gcc]$