This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/31824] New: Code generation problem with gnat-4.1.2
- From: "theorizer at freemail dot hu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2007 21:16:43 -0000
- Subject: [Bug ada/31824] New: Code generation problem with gnat-4.1.2
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I've realized a strange code generation behavior I cannot explain and I think
to be a bug. It's merely about that a function calls to another one with a
parameter read from a constant array. The constant array superfluously gets
copied onto the stack.
I've attached the test code with one can reproduce the problem. Compile it with
command:
gnatmake -c -s bug.adb (copying "manually" byte for byte)
gnatmake -c -Os -s bug.adb (copying by calling to memcpy)
with objdump -D bug.o you can check the result.
--
Summary: Code generation problem with gnat-4.1.2
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: theorizer at freemail dot hu
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31824