public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/7873: arm-linux-gcc fails when assigning address to a bit  field
@ 2002-09-10  2:56 Richard Earnshaw
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Earnshaw @ 2002-09-10  2:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/7873; it has been noted by GNATS.

From: Richard Earnshaw <rearnsha@cambridge.arm.com>
To: alex.zatsman@analog.com
Cc: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org,
        Richard.Earnshaw@arm.com
Subject: Re: c/7873: arm-linux-gcc fails when assigning address to a bit 
 field
Date: Tue, 10 Sep 2002 10:50:50 +0100

 > >How-To-Repeat:
 > 
 > /** Run "arm-linux-gcc -c" on this preprocessed segment : **/
 > 
 > 
 > unsigned int  x0  = 0;
 > 
 > typedef struct {
 >   unsigned int  field1 : 20;
 >   unsigned int  field2 : 12;
 > } XX;
 > 
 > static XX yy;
 > 
 > static void foo (void)
 > {
 >   yy.field1 = (unsigned int ) (&x0);
 > }
 
 Please try the following patch:
 
 2002-09-10  Richard Earnshaw  <rearnsha@arm.com>
 
 	* arm.md (insv): Use reg_or_int_operand for operand[3].
 
 Index: arm.md
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.md,v
 retrieving revision 1.104
 diff -p -r1.104 arm.md
 *** arm.md	29 Jul 2002 12:41:46 -0000	1.104
 --- arm.md	10 Sep 2002 09:44:07 -0000
 ***************
 *** 1866,1872 ****
     [(set (zero_extract:SI (match_operand:SI 0 "s_register_operand" "")
                            (match_operand:SI 1 "general_operand" "")
                            (match_operand:SI 2 "general_operand" ""))
 !         (match_operand:SI 3 "nonmemory_operand" ""))]
     "TARGET_ARM"
     "
     {
 --- 1866,1872 ----
     [(set (zero_extract:SI (match_operand:SI 0 "s_register_operand" "")
                            (match_operand:SI 1 "general_operand" "")
                            (match_operand:SI 2 "general_operand" ""))
 !         (match_operand:SI 3 "reg_or_int_operand" ""))]
     "TARGET_ARM"
     "
     {
 
 


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

* Re: c/7873: arm-linux-gcc fails when assigning address to a bit field
@ 2002-09-10  8:47 rearnsha
  0 siblings, 0 replies; 3+ messages in thread
From: rearnsha @ 2002-09-10  8:47 UTC (permalink / raw)
  To: alex.zatsman, gcc-bugs, gcc-prs, nobody, rearnsha

Synopsis: arm-linux-gcc fails when assigning address to a bit field

Responsible-Changed-From-To: unassigned->rearnsha
Responsible-Changed-By: rearnsha
Responsible-Changed-When: Tue Sep 10 08:47:00 2002
Responsible-Changed-Why:
    .
State-Changed-From-To: open->closed
State-Changed-By: rearnsha
State-Changed-When: Tue Sep 10 08:47:00 2002
State-Changed-Why:
    Fixed

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7873


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

* c/7873: arm-linux-gcc fails when assigning address to a bit field
@ 2002-09-09 15:26 alex.zatsman
  0 siblings, 0 replies; 3+ messages in thread
From: alex.zatsman @ 2002-09-09 15:26 UTC (permalink / raw)
  To: gcc-gnats, debian-gcc


>Number:         7873
>Category:       c
>Synopsis:       arm-linux-gcc fails when assigning address to a bit field
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 09 15:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Alex Zatsman
>Release:        arm-linux-gcc v.3.2
>Organization:
Analog Devices
>Environment:
System: Linux tula 2.4.9 #1 SMP Fri Oct 26 14:37:41 EDT 2001 i686 unknown
Architecture: i686

	
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: arm-linux set 
>Description:

./arm-linux-gcc -c xxx2.c
xxx2.c: In function `foo':
xxx2.c:13: unrecognizable insn:
(insn 13 11 15 (set (reg:SI 34)
        (ashift:SI (symbol_ref:SI ("x0"))
            (const_int 12 [0xc]))) -1 (nil)
    (nil))
xxx2.c:13: Internal compiler error in extract_insn, at recog.c:2148
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

>How-To-Repeat:

/** Run "arm-linux-gcc -c" on this preprocessed segment : **/


unsigned int  x0  = 0;

typedef struct {
  unsigned int  field1 : 20;
  unsigned int  field2 : 12;
} XX;

static XX yy;

static void foo (void)
{
  yy.field1 = (unsigned int ) (&x0);
}





>Fix:
	You tell me :)
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-09-10 15:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-10  2:56 c/7873: arm-linux-gcc fails when assigning address to a bit field Richard Earnshaw
  -- strict thread matches above, loose matches on Subject: below --
2002-09-10  8:47 rearnsha
2002-09-09 15:26 alex.zatsman

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).