public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/25613] New: sh compiler hangs when compiling some inline asm
@ 2005-12-31 13:42 vapier at gentoo dot org
2005-12-31 14:46 ` [Bug c/25613] " kkojima at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: vapier at gentoo dot org @ 2005-12-31 13:42 UTC (permalink / raw)
To: gcc-bugs
attempting to build a package which tests a bunch of inline assembly snippets
to see if the host supports it ... in this case, this snippet caused a hang:
lantank # cat conftest.c
int main() {
unsigned long foo;
asm("pklb %1, %0" : "=r" (foo) : "rI" (foo));
return 0;
}
lantank # gcc -v -c conftest.c
Reading specs from /usr/lib/gcc/sh4-gentoo-linux-uclibc/3.4.5/specs
Configured with: /var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/configure
--prefix=/usr --bindir=/usr/sh4-gentoo-linux-uclibc/gcc-bin/3.4.5
--includedir=/usr/lib/gcc/sh4-gentoo-linux-uclibc/3.4.5/include
--datadir=/usr/share/gcc-data/sh4-gentoo-linux-uclibc/3.4.5
--mandir=/usr/share/gcc-data/sh4-gentoo-linux-uclibc/3.4.5/man
--infodir=/usr/share/gcc-data/sh4-gentoo-linux-uclibc/3.4.5/info
--with-gxx-include-dir=/usr/lib/gcc/sh4-gentoo-linux-uclibc/3.4.5/include/g++-v3
--host=sh4-gentoo-linux-uclibc --build=sh4-gentoo-linux-uclibc
--disable-altivec --disable-nls --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libmudflap --disable-libgcj --enable-languages=c,c++ --enable-shared
--enable-threads=posix --disable-__cxa_atexit --enable-target-optspace
--enable-clocale=uclibc
Thread model: posix
gcc version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)
/usr/libexec/gcc/sh4-gentoo-linux-uclibc/3.4.5/cc1 -quiet -v conftest.c -quiet
-dumpbase conftest.c -auxbase conftest -version -o /tmp/cctiJvYX.s
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/sh4-gentoo-linux-uclibc/3.4.5/../../../../sh4-gentoo-linux-uclibc/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/sh4-gentoo-linux-uclibc/3.4.5/include
/usr/include
End of search list.
GNU C version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)
(sh4-gentoo-linux-uclibc)
compiled by GNU C version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0,
pie-8.7.9).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
<hangs here>
attaching with strace shows that it's just spinning in an infinite loop
somewhere
tested Gentoo/gcc-3.4.5 native/cross sh4, FC4/gcc-4.0.0 cross
--
Summary: sh compiler hangs when compiling some inline asm
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vapier at gentoo dot org
GCC target triplet: sh4-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25613
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/25613] sh compiler hangs when compiling some inline asm
2005-12-31 13:42 [Bug c/25613] New: sh compiler hangs when compiling some inline asm vapier at gentoo dot org
@ 2005-12-31 14:46 ` kkojima at gcc dot gnu dot org
2005-12-31 17:43 ` [Bug inline-asm/25613] [4.0 Regression] " pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2005-12-31 14:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from kkojima at gcc dot gnu dot org 2005-12-31 14:46 -------
FYI, current trunk and 4.1.0 (20051127 prerelease) exit with
"error: impossible constraint in 'asm'" messages for the given
test case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25613
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug inline-asm/25613] [4.0 Regression] sh compiler hangs when compiling some inline asm
2005-12-31 13:42 [Bug c/25613] New: sh compiler hangs when compiling some inline asm vapier at gentoo dot org
2005-12-31 14:46 ` [Bug c/25613] " kkojima at gcc dot gnu dot org
@ 2005-12-31 17:43 ` pinskia at gcc dot gnu dot org
2006-01-02 5:14 ` kkojima at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-31 17:43 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25613
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug inline-asm/25613] [4.0 Regression] sh compiler hangs when compiling some inline asm
2005-12-31 13:42 [Bug c/25613] New: sh compiler hangs when compiling some inline asm vapier at gentoo dot org
2005-12-31 14:46 ` [Bug c/25613] " kkojima at gcc dot gnu dot org
2005-12-31 17:43 ` [Bug inline-asm/25613] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2006-01-02 5:14 ` kkojima at gcc dot gnu dot org
2006-01-04 23:07 ` [Bug target/25613] " kkojima at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2006-01-02 5:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from kkojima at gcc dot gnu dot org 2006-01-02 05:13 -------
It looks an SH target specific problem.
CONSTRAINT_LEN in config/sh/sh.h of 3.4/4.0 checks the wrong
constraints and returns -1 for them. This causes an infinite
loop in parse_input_constraint whick has a loop like:
for (j = 0; j < c_len; j += CONSTRAINT_LEN (constraint[j], constraint+j))
...
for the testcase in #1. It seems that the above check
is to confirm the validity of the constraints which were
introduced when some SH single character constraints were
renamed to multiple character ones and that check was removed
on 4.1/trunk but it's simply forgotten to remove on the older
branches.
I'll propose a patch after the usual tests on branches.
It will take several days.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25613
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/25613] [4.0 Regression] sh compiler hangs when compiling some inline asm
2005-12-31 13:42 [Bug c/25613] New: sh compiler hangs when compiling some inline asm vapier at gentoo dot org
` (2 preceding siblings ...)
2006-01-02 5:14 ` kkojima at gcc dot gnu dot org
@ 2006-01-04 23:07 ` kkojima at gcc dot gnu dot org
2006-01-05 5:02 ` vapier at gentoo dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2006-01-04 23:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from kkojima at gcc dot gnu dot org 2006-01-04 23:07 -------
Subject: Bug 25613
Author: kkojima
Date: Wed Jan 4 23:07:24 2006
New Revision: 109355
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109355
Log:
PR target/25613
* config/sh/sh.h (CONSTRAINT_LEN): Use unchecking version.
Modified:
branches/gcc-4_0-branch/gcc/ChangeLog
branches/gcc-4_0-branch/gcc/config/sh/sh.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25613
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/25613] [4.0 Regression] sh compiler hangs when compiling some inline asm
2005-12-31 13:42 [Bug c/25613] New: sh compiler hangs when compiling some inline asm vapier at gentoo dot org
` (3 preceding siblings ...)
2006-01-04 23:07 ` [Bug target/25613] " kkojima at gcc dot gnu dot org
@ 2006-01-05 5:02 ` vapier at gentoo dot org
2006-01-05 6:04 ` kkojima at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: vapier at gentoo dot org @ 2006-01-05 5:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from vapier at gentoo dot org 2006-01-05 05:02 -------
awesome, that fixed it in my 3.4.5 cross-compiler, now it exits with:
conftest.c: In function `main':
conftest.c:3: error: impossible constraint in `asm'
will this fix be applied only to the 4.0 branch ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25613
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/25613] [4.0 Regression] sh compiler hangs when compiling some inline asm
2005-12-31 13:42 [Bug c/25613] New: sh compiler hangs when compiling some inline asm vapier at gentoo dot org
` (4 preceding siblings ...)
2006-01-05 5:02 ` vapier at gentoo dot org
@ 2006-01-05 6:04 ` kkojima at gcc dot gnu dot org
2006-01-12 1:20 ` kkojima at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2006-01-05 6:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from kkojima at gcc dot gnu dot org 2006-01-05 06:04 -------
I proposed the patch in #3 at
http://gcc.gnu.org/ml/gcc-patches/2006-01/msg00174.html
and an SH maintainer has approved it. It's enough to check it in on 4.0,
though I believe that the patch for 3.4 branch needs an explicit approval
from the release manager of 3.4 branch. I'm waiting it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25613
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/25613] [4.0 Regression] sh compiler hangs when compiling some inline asm
2005-12-31 13:42 [Bug c/25613] New: sh compiler hangs when compiling some inline asm vapier at gentoo dot org
` (5 preceding siblings ...)
2006-01-05 6:04 ` kkojima at gcc dot gnu dot org
@ 2006-01-12 1:20 ` kkojima at gcc dot gnu dot org
2006-01-15 22:59 ` mmitchel at gcc dot gnu dot org
2006-01-16 4:26 ` kkojima at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2006-01-12 1:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from kkojima at gcc dot gnu dot org 2006-01-12 01:20 -------
Subject: Bug 25613
Author: kkojima
Date: Thu Jan 12 01:20:32 2006
New Revision: 109625
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109625
Log:
PR target/25613
* config/sh/sh.h (CONSTRAINT_LEN): Use unchecking version.
Modified:
branches/gcc-3_4-branch/gcc/ChangeLog
branches/gcc-3_4-branch/gcc/config/sh/sh.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25613
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/25613] [4.0 Regression] sh compiler hangs when compiling some inline asm
2005-12-31 13:42 [Bug c/25613] New: sh compiler hangs when compiling some inline asm vapier at gentoo dot org
` (6 preceding siblings ...)
2006-01-12 1:20 ` kkojima at gcc dot gnu dot org
@ 2006-01-15 22:59 ` mmitchel at gcc dot gnu dot org
2006-01-16 4:26 ` kkojima at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-01-15 22:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from mmitchel at gcc dot gnu dot org 2006-01-15 22:59 -------
SH is not a primary platform; P5.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25613
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/25613] [4.0 Regression] sh compiler hangs when compiling some inline asm
2005-12-31 13:42 [Bug c/25613] New: sh compiler hangs when compiling some inline asm vapier at gentoo dot org
` (7 preceding siblings ...)
2006-01-15 22:59 ` mmitchel at gcc dot gnu dot org
@ 2006-01-16 4:26 ` kkojima at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2006-01-16 4:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from kkojima at gcc dot gnu dot org 2006-01-16 04:26 -------
Patches were committed already.
Sorry for forgetting to change this as FIXED.
--
kkojima at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25613
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-01-16 4:26 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-31 13:42 [Bug c/25613] New: sh compiler hangs when compiling some inline asm vapier at gentoo dot org
2005-12-31 14:46 ` [Bug c/25613] " kkojima at gcc dot gnu dot org
2005-12-31 17:43 ` [Bug inline-asm/25613] [4.0 Regression] " pinskia at gcc dot gnu dot org
2006-01-02 5:14 ` kkojima at gcc dot gnu dot org
2006-01-04 23:07 ` [Bug target/25613] " kkojima at gcc dot gnu dot org
2006-01-05 5:02 ` vapier at gentoo dot org
2006-01-05 6:04 ` kkojima at gcc dot gnu dot org
2006-01-12 1:20 ` kkojima at gcc dot gnu dot org
2006-01-15 22:59 ` mmitchel at gcc dot gnu dot org
2006-01-16 4:26 ` kkojima 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).