public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/42375] New: trunk hangs during diffutils configure
@ 2009-12-15 5:23 dirtyepic at gentoo dot org
2009-12-15 5:24 ` [Bug other/42375] " dirtyepic at gentoo dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: dirtyepic at gentoo dot org @ 2009-12-15 5:23 UTC (permalink / raw)
To: gcc-bugs
the attached code from the diffutils configure script is supposed to check for
"working C stack overflow detection" but instead hangs when built with trunk at
-O2 or higher. 4.4.2 works.
$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-unknown-linux-gnu/gcc-bin/4.5.0-pre9999/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0-pre9999/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.5.0_pre9999/work/gcc-4.5.0-9999/configure
--prefix=/usr --bindir=/usr/x86_64-unknown-linux-gnu/gcc-bin/4.5.0-pre9999
--includedir=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0-pre9999/include
--datadir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/4.5.0-pre9999
--mandir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/4.5.0-pre9999/man
--infodir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/4.5.0-pre9999/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0-pre9999/include/g++-v4
--host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu
--disable-altivec --disable-fixed-point --with-ppl --with-cloog --disable-nls
--with-system-zlib --disable-checking --disable-werror --enable-secureplt
--enable-multilib --disable-libmudflap --disable-libssp --enable-libgomp
--enable-cld
--with-python-dir=/share/gcc-data/x86_64-unknown-linux-gnu/4.5.0-pre9999/python
--disable-libgcj --enable-languages=c,c++ --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo SVN'
--enable-lto --enable-checking
Thread model: posix
gcc version 4.5.0-pre9999 20091215 (experimental) rev. 155245 (Gentoo SVN)
--
Summary: trunk hangs during diffutils configure
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dirtyepic at gentoo dot org
GCC host triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42375
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug other/42375] trunk hangs during diffutils configure
2009-12-15 5:23 [Bug other/42375] New: trunk hangs during diffutils configure dirtyepic at gentoo dot org
@ 2009-12-15 5:24 ` dirtyepic at gentoo dot org
2009-12-15 5:25 ` dirtyepic at gentoo dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: dirtyepic at gentoo dot org @ 2009-12-15 5:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dirtyepic at gentoo dot org 2009-12-15 05:24 -------
Created an attachment (id=19303)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19303&action=view)
conftest.i
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42375
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug other/42375] trunk hangs during diffutils configure
2009-12-15 5:23 [Bug other/42375] New: trunk hangs during diffutils configure dirtyepic at gentoo dot org
2009-12-15 5:24 ` [Bug other/42375] " dirtyepic at gentoo dot org
@ 2009-12-15 5:25 ` dirtyepic at gentoo dot org
2009-12-15 13:35 ` [Bug tree-optimization/42375] " rguenth at gcc dot gnu dot org
2009-12-22 14:26 ` jamborm at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: dirtyepic at gentoo dot org @ 2009-12-15 5:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dirtyepic at gentoo dot org 2009-12-15 05:24 -------
Created an attachment (id=19304)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19304&action=view)
conftest.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42375
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/42375] trunk hangs during diffutils configure
2009-12-15 5:23 [Bug other/42375] New: trunk hangs during diffutils configure dirtyepic at gentoo dot org
2009-12-15 5:24 ` [Bug other/42375] " dirtyepic at gentoo dot org
2009-12-15 5:25 ` dirtyepic at gentoo dot org
@ 2009-12-15 13:35 ` rguenth at gcc dot gnu dot org
2009-12-22 14:26 ` jamborm at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-12-15 13:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-12-15 13:35 -------
This is a bug in the test. Early inter-procedural SRA avoids passing array by
reference in the recurse() function and instead passes the first element
which is the only one read. Thus the function is optimized to
an endless loop.
static int
recurse (char *p)
{
char array[500];
array[0] = 1;
return *p + recurse (array);
}
int
main (void)
{
return recurse ("\1");
}
on i686 (or with -m32) this does not happen - Martin, any idea why?
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jamborm at gcc dot gnu dot
| |org
Component|other |tree-optimization
GCC host triplet|x86_64-unknown-linux-gnu |
GCC target triplet| |i?86-*-*
Keywords| |missed-optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42375
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/42375] trunk hangs during diffutils configure
2009-12-15 5:23 [Bug other/42375] New: trunk hangs during diffutils configure dirtyepic at gentoo dot org
` (2 preceding siblings ...)
2009-12-15 13:35 ` [Bug tree-optimization/42375] " rguenth at gcc dot gnu dot org
@ 2009-12-22 14:26 ` jamborm at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2009-12-22 14:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jamborm at gcc dot gnu dot org 2009-12-22 14:26 -------
(In reply to comment #3)
>
> on i686 (or with -m32) this does not happen - Martin, any idea why?
>
I had to examine the testcase to find out. It turns out that on i686
is_va_list_type() returns true for this type (char *) and so IPA-SRA
does not even consider it a candidate.
The test was added because of premature decomposition of alpha stdarg
structures (pretty much the same issue as with early intraprocedural
SRA) and so does not really make sense here. An easy way out of this
would be to allow scalar is_va_list_type types. I will make a patch
for next stage 1.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42375
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-12-22 14:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-15 5:23 [Bug other/42375] New: trunk hangs during diffutils configure dirtyepic at gentoo dot org
2009-12-15 5:24 ` [Bug other/42375] " dirtyepic at gentoo dot org
2009-12-15 5:25 ` dirtyepic at gentoo dot org
2009-12-15 13:35 ` [Bug tree-optimization/42375] " rguenth at gcc dot gnu dot org
2009-12-22 14:26 ` jamborm at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).