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

[Bug ada/28305] New: GNAT bug when inlining instance of a generic subprogram


A GNAT bug is detected whenever pragma Inline is applied to an instance of a
generic subprogram and front-end inlining is activated (-gnatN).  The problem
can be worked around by either applying the pragma Inline to the generic
subprogram declaration or deactivating front-end inlining.

The test case I used is as follows:

gcc -c -gnatN test.ads

generic
  type T is private;
function A (Value : T) return T;

function A (Value : T) return T is
begin
  return Value;
end A;

with A;
pragma Elaborate_All (A);

function Test is new A (Integer);
pragma Inline (Test);


-- 
           Summary: GNAT bug when inlining instance of a generic subprogram
           Product: gcc
           Version: 3.4.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dewi dot daniels at silver-software dot com


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


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