#29 Rule "usage" does not report actual subprograms called by an instantiation

acknowledged
None
normal
major
always
none
ASIS
2012-08-10
2012-05-30
No

(Allozano)

I execute:
*adactl -r -d -F CSVX -v -f rules.aru m_main.adb*

The problem is adacontrol says me Q_1.P_1 isn't executed but it is
called from a procedure instantiation.
*q_1.ads;4;13;Error;SR358_07;USAGE;"(normal) Q_1.P_1, visible,
procedure, not called, not accessed"*

I have been debugging and the problem is in rules-usage.adb.

In this file you try to get instantiated body fot this procedure
instantiation but corresponding_body return nil_element:
*Instantiated_Body : constant Asis.Declaration :=
Corresponding_Body&nbps;&nbps;&nbps;&nbps;&nbps;&nbps;&nbps; (Instantiation);*

I think corresponding_body returns nil because this body isn't in asis
context but I'm not sure.
For this reason I don't know if the problem is in ASIS or Adacontrol.

Where is the problem, in ASIS or Adacontrol?

Discussion

  • NOT reproduced with GnatPro 7.0.1; apparently fixed in recent ASIS.
    Waiting for GPL2012...

     
  • With GnatPRO 7.0.1: sometimes it works, sometimes it doesn't. Hard to reduce and
    reproduce systematically.

    Same behaviour with GPL 2012. Will need to ultimately make a convincing example and report to AdaCore, but not worth delaying the public release of AdaControl.

     


Anonymous


Cancel   Add attachments