public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cajus dot hahn at de dot abb dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/26118]  New: avr-gcc (GCC) 3.4.5 Bug: copying structure through pointer will destroy the pointer
Date: Mon, 06 Feb 2006 09:17:00 -0000	[thread overview]
Message-ID: <bug-26118-12140@http.gcc.gnu.org/bugzilla/> (raw)

there is a bug in avr-gcc (GCC) 3.4.5, that comes with the latest WinAVR
distribution (20060125).
The  avr-gcc (GCC) 3.4.3, that comes with WinAVR 20050214 does NOT contain this
bug. 
The bug exists with and without optimization (I tried -O0 and -Os)
If you try to copy a structure with
 *struct_pointer = struct; 
the struct_pointer gets destroyed.
The assembler code generated seems to add one structure length foreach copied
byte to the pointer.
The complete code is attached. (there I use  *struct_pointer++, but it is the
same problem there).


-- 
           Summary: avr-gcc (GCC) 3.4.5 Bug: copying structure through
                    pointer will destroy the pointer
           Product: gcc
           Version: 3.4.5
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cajus dot hahn at de dot abb dot com


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


             reply	other threads:[~2006-02-06  9:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-06  9:17 cajus dot hahn at de dot abb dot com [this message]
2006-02-06  9:18 ` [Bug c/26118] " cajus dot hahn at de dot abb dot com
2006-02-06 19:46 ` [Bug target/26118] " lmorrison at nautel dot com
2006-02-06 19:49 ` lmorrison at nautel dot com
2006-02-06 19:54 ` lmorrison at nautel dot com
2006-02-06 20:05 ` cajus dot hahn at de dot abb dot com
2006-03-01 18:53 ` j at uriah dot heep dot sax dot de
2008-12-26 16:12 ` tkoenig at gcc dot gnu dot org
2009-08-20  9:47 ` anitha dot boyapati at atmel dot com
2009-08-20 22:13 ` eric dot weddington at atmel dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-26118-12140@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).