This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/20625] [4.0/4.1 regression] ivopts produces code that generates "unaligned access exception"
- From: "tsv at solvo dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2005 20:03:16 -0000
- Subject: [Bug target/20625] [4.0/4.1 regression] ivopts produces code that generates "unaligned access exception"
- References: <20050324165328.20625.tsv@solvo.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From tsv at solvo dot ru 2005-05-05 20:03 -------
(In reply to comment #20)
> (In reply to comment #19)
> > Should not be some warning to be generated?
>
> There is a warning if going directly from char * to the union pointer but
since you go through a void
> pointer, the warning is gone.
Yes, it does. DEC C generates exactly the same code for "foo" function. So, I am
sorry for my wrong testcase.
I am trying to find out where unaligned pointer is came from. Going couple
functions back I found that it is the address if "unsigned char" variable
allocated on stack. Should I look at this issue or it might be possible in
theory and I should report about improper coding practice to the author of the code?
Thank you for your attention
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20625