This is the mail archive of the gcc-patches@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]

[PATCH] PR ada/66205 gnatbind generates invalid code when finalization is enabled in restricted runtime


If the RTS in use is "configurable" (I believe this is the same in this context as "restricted") and includes finalization, gnatbind generates binder code that won't compile.

This situation arises, for example, with an embedded RTS that incorporates the Ada 2012 generalized container iterators.

The attached patch was bootstrapped/regression tested (make check-ada) against 5.1.0 on x86_64-apple-darwin13 (which confirms that the patch hasn't broken builds against the standard RTS).

arm-eabi-gnatbind was successful against both an RTS with finalization and one without.

The patch applies with no offset to the trunk.

gcc/ada/Changelog:

2015-6-15  Simon Wright <simon@pushface.org>

        PR ada/66205
        * bindgen.adb (Gen_Adafinal): if Configurable_Run_Time_On_Target is
        true, generate a null body.
        (Gen_Main): if Configurable_Run_Time_On_Target is true, then
        - don't import __gnat_initialize or __gnat_finalize (as Initialize,
        Finalize rsp).
        - don't call Initialize or Finalize.

Attachment: pr66205.diff
Description: Binary data


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