10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2024-12-21 11:53:32 +01:00

Check unused providers

This commit is contained in:
Anthony Scemama 2013-01-21 12:27:44 +01:00
parent 2fecac9d79
commit 42c898d509
2 changed files with 3 additions and 0 deletions

View File

@ -47,6 +47,7 @@ options['l'] = [ 'align' , 'Align arrays using compiler directives. Sets
options['s'] = [ 'substitute' , 'Substitute values for loop max values', 1 ]
options['r'] = [ 'no_directives', 'Ignore compiler directives !DEC$ and !DIR$', 0 ]
options['n'] = [ 'inline' , 'all|providers|builders : Force inlining of providers or builders', 1 ]
options['u'] = [ 'unused' , 'Print unused providers', 0 ]
class CommandLine(object):

View File

@ -618,6 +618,8 @@ class Variable(object):
from variables import variables
if '_needed_by' not in self.__dict__:
import parsed_text
if command_line.do_unused and self.needed_by == []:
error.warn(None, "Provider %s is not used"%self.name)
result = []
for x in self.needed_by:
result.append(x)