sys-devel/gcc-4.0.3 and sys-devel/gcc-4.1.1-r3 crashed with builtin sprintf. In sys-devel/gcc-3.3.6-r1 and sys-devel/gcc-3.4.6-r2, no trouble. Reproducible: Always Steps to Reproduce: 1. foobar.i, just as follows; extern int sprintf(char *__restrict__, const char *__restrict__, ...) __attribute__ ((__nothrow__)); int main(void) { char name[] = ""; sprintf(name, "%s"); return 0; } 2. gcc -c foobar.i Actual Results: foobar.i: In function 'main': foobar.i:9: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. Preprocessed source stored into /tmp/ccWLaRay.out file, please attach this to your bugreport. Expected Results: It should be compiled. GCC success compiling, if as follows; $ gcc -fno-builtin foobar.i $ gcc -fno-builtin-sprintf foobar.i
Created attachment 108042 [details] Actual example, preprocessed source code
reproduced on ppc with gcc-4.1.1 and gcc-4.3.0-alpha20061111
Could you please report upstream and paste a link to their bugzilla entry here?
Now, I found the similar bug report in the upstream bugzilla. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30473
Luca: rarely do i ask users to submit stuff upstream with the toolchain ... it's generally been bad PR for us with the gcc people because most of the time the bug report comes of sounding like Gentoo screwed everything up
http://cvs.fedora.redhat.com/viewcvs/*checkout*/devel/gcc/gcc41-pr30473.patch this will not be in 4.1.2 RC1, but as it's an ICE-on-valid it might still yet make it into the final.
ive added the patch to our cvs patchset so it'll either be in the 4.1.2 release itself or our 4.1.2 patchset thanks Ryan