system's gcc bug?

[ Available lists | Index of freebsd-current | Month of Mar 2004 | Week of 31 Mar 2004 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Rene Ladan <r.c.ladan@student.tue.nl>
Date
31 Mar 2004 02:18:36
Subject
system's gcc bug?
Message-ID
20040331101834.GA21652@dyn-099164.nbw.tue.nl

Referenced by

[ Hide this part ]
Hi,

I'm getting runtime errors when executing the following program and
declaring one of the arrays:

----------------

#include <stdio.h>

int main(void) {
/* int a[4] = { 0, 1, 2, 3 }; enable this line to get a buserror */
int *i;
/* int b[4] = { 0, 1, 2, 3 }; enable this line to get a segfault */
for (*i = 0; *i < 4; (*i)++)
printf("%p %i\n", i, *i);
return(0);
}

----------------

I'm running system's gcc on 5.2.1-release:

Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.3.3 [FreeBSD] 20031106

I have not yet mailed to the gcc developers, as the system gcc is
somewhat patched. Neither have I filed a PR yet.

Rene


[ Show this part (application/pgp-signature) ]

Elapsed time: 0.144 seconds