This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

implicit gnat_malloc seen as vararg function


Hi,

I'm working on a private port of GCC 4.7.3/GNAT 7.1.2.

Calls to ADA 'new' operator generates implicit gnat_malloc(size) calls (which has to be provided by user program or runtime).

In my macro INIT_CUMULATIVE_ARGS I noticed that gnat_malloc(size) calls are seen as vararg function because the tree.c function stdarg_p(fntype) returns true. This creates bad code because caller put the argument in stack (this is normal behaviour for my vararg functions) whereas the callee expected argument in register (gnat_malloc signature should only contains the 'size'  argument of type size_type).

microblaze and iq2000 backend should have the same problem because inside INIT_CUMULATIVE_ARGS macro, variable argument function are identified by browsing fntype tree chain (like stdarg_p does)

Do I have to fix the GNAT frontend or did I missed an option dealing with gnat_malloc behaviour ?

Regards,

   Selim Belbachir


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]