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

Next Release
fixed
None
normal
major
Always
none
ASIS
1.17r3
2015-11-05
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

  • Jean-Pierre Rosen

     
  • Jean-Pierre Rosen

    Reproduced with Gnat GPL2011, Corresponding_Body should not return a Nil_Element.

     
  • Jean-Pierre Rosen

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

     
  • Jean-Pierre Rosen

    Reopened to remember to check with GPL2012

     
  • Jean-Pierre Rosen

    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.

     
  • Jean-Pierre Rosen

    • status: acknowledged --> fixed
    • Group: --> Next Release
    • Reproducibility: always --> Always
    • fixed_in_version: --> 1.17r3
     
  • Jean-Pierre Rosen

    GPL2015: still same behaviour, but the problem does not show with Asistant, so it's hard to report to AdaCore.
    Found a workaround, so closing this ticket as "fixed".

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks