public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/26591]  New: Spurious parse error message with register struct .
@ 2006-03-07 10:36 ramana dot radhakrishnan at codito dot com
  2006-03-07 10:49 ` [Bug c/26591] " ramana dot radhakrishnan at codito dot com
  2006-03-07 12:28 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: ramana dot radhakrishnan at codito dot com @ 2006-03-07 10:36 UTC (permalink / raw)
  To: gcc-bugs

Derived from gdb/testsuite/gdb.base/store.c : 

struct s_3 { short s[3]; } z_3, s_3;
struct s_3
add_struct_3 (struct s_3 s)
{
  int i;
  for (i = 0; i < sizeof (s) / sizeof (s.s[0]); i++)
    {
      s.s[i] = s.s[i] + s.s[i];
    }
  return s;
}


struct s_3
wack_struct_3 (void)
{
  int i; register struct s_3 u = z_3;
  for (i = 0; i < sizeof (s_3) / sizeof (s_3.s[0]); i++) { s_3.s[i] = i + 1; }
  u = add_struct_3 (u);
  return u;
}

Compiling this with arm-none-eabi-gcc gives : 

try.c: In function 'wack_struct_3':
try.c:41: error: address of register variable 'u' requested

3.4.5 and 4.0 seem to compile this ok. Its possibly related to the fix for
#18160 .


-- 
           Summary: Spurious parse error message with register struct .
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ramana dot radhakrishnan at codito dot com
 GCC build triplet: i686-linux-gnu
  GCC host triplet: i686-linux-gnu
GCC target triplet: arm-none-eabi


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


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

* [Bug c/26591] Spurious parse error message with register struct .
  2006-03-07 10:36 [Bug c/26591] New: Spurious parse error message with register struct ramana dot radhakrishnan at codito dot com
@ 2006-03-07 10:49 ` ramana dot radhakrishnan at codito dot com
  2006-03-07 12:28 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: ramana dot radhakrishnan at codito dot com @ 2006-03-07 10:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from ramana dot radhakrishnan at codito dot com  2006-03-07 10:49 -------
Occurs with arm-none-eabi-gcc 4.1.0 -branch with yesterday's update. 


-- 

ramana dot radhakrishnan at codito dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Spurious parse error message|Spurious parse error message
                   |with register struct .      |with register struct .


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


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

* [Bug c/26591] Spurious parse error message with register struct .
  2006-03-07 10:36 [Bug c/26591] New: Spurious parse error message with register struct ramana dot radhakrishnan at codito dot com
  2006-03-07 10:49 ` [Bug c/26591] " ramana dot radhakrishnan at codito dot com
@ 2006-03-07 12:28 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-07 12:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-03-07 12:28 -------


*** This bug has been marked as a duplicate of 26004 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2006-03-07 12:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-07 10:36 [Bug c/26591] New: Spurious parse error message with register struct ramana dot radhakrishnan at codito dot com
2006-03-07 10:49 ` [Bug c/26591] " ramana dot radhakrishnan at codito dot com
2006-03-07 12:28 ` 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).