public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/34250]  New: ICE in find_constant_pool_ref
@ 2007-11-27 18:27 matz at gcc dot gnu dot org
  2007-11-27 19:02 ` [Bug target/34250] " matz at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: matz at gcc dot gnu dot org @ 2007-11-27 18:27 UTC (permalink / raw)
  To: gcc-bugs

This was triggered by a patch of ours on the SLES10 compiler, which is 4.1.2
based.  But it can be seen without any patches, for 4.1.x and trunk at least.
I'm sure the other compilers in between have the same problem, as the code
in the s390 backend is designed to error in these cases.  Anyway, do this:

% cat try.c
void func2(void)
{
  __asm__ ("#bla" : : "g" ("consta"), "g" ("constb") );
}

% ./gcc/cc1 -quiet -m31 -O try.c
try.c: In function ‘func2’:
try.c:4: internal compiler error: in find_constant_pool_ref, at
config/s390/s390.c:5171

You need 31bit mode, otherwise this code path doesn't trigger.  The problem
is, that find_constant_pool_ref is designed to handle only max one reference
to the constant pool per instruction (multiple ones to the same constant are
allowed, but not multiple different ones).  For normal instructions this is
okay, but as can be seen above it's trivial to trigger this with asm 
instructions.

The only fix I can imagine is to actually deal with this situation and iterate
over possibly many literal pool refs.


-- 
           Summary: ICE in find_constant_pool_ref
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: matz at gcc dot gnu dot org
GCC target triplet: s390-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34250


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-12-08 22:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-27 18:27 [Bug target/34250] New: ICE in find_constant_pool_ref matz at gcc dot gnu dot org
2007-11-27 19:02 ` [Bug target/34250] " matz at gcc dot gnu dot org
2007-11-27 19:05 ` matz at gcc dot gnu dot org
2007-11-28 13:36 ` uweigand at gcc dot gnu dot org
2007-11-28 15:29 ` matz at gcc dot gnu dot org
2007-11-28 15:41 ` rguenth at gcc dot gnu dot org
2007-11-28 15:59 ` matz at gcc dot gnu dot org
2007-11-28 17:12 ` uweigand at gcc dot gnu dot org
2007-12-08 22:36 ` pinskia 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).