Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
codeaster-fra
devtools
Commits
d0adca44
Commit
d0adca44
authored
1 month ago
by
Mathieu Courtois
Browse files
Options
Downloads
Patches
Plain Diff
[#34412] detect message on large arrays on stack
parent
99dca37a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/aslint/fortran/gfortran_checkers.py
+12
-56
12 additions, 56 deletions
lib/aslint/fortran/gfortran_checkers.py
with
12 additions
and
56 deletions
lib/aslint/fortran/gfortran_checkers.py
+
12
−
56
View file @
d0adca44
...
...
@@ -41,12 +41,7 @@ def check_command_line(kwargs):
]
+
sizeopts
+
kwargs
[
"
flags
"
]
+
[
"
-c
"
,
kwargs
[
"
source
"
],
"
-o
"
,
kwargs
[
"
object
"
],
]
+
[
"
-c
"
,
kwargs
[
"
source
"
],
"
-o
"
,
kwargs
[
"
object
"
]]
)
return
cmd
...
...
@@ -83,7 +78,6 @@ def search_loc_msg(expr):
class
SentinelLocError
(
CompilOutputCat
,
CompilMsg
):
"""
Error
"""
id
=
"
E9990
"
...
...
@@ -94,7 +88,6 @@ class SentinelLocError(CompilOutputCat, CompilMsg):
class
SentinelError
(
CompilOutputCat
,
CompilMsg
):
"""
Error
"""
id
=
"
E9991
"
...
...
@@ -103,7 +96,6 @@ class SentinelError(CompilOutputCat, CompilMsg):
class
SentinelLocWarning
(
CompilOutputCat
,
CompilMsg
):
"""
Unexpected warning
"""
id
=
"
C9992
"
...
...
@@ -114,7 +106,6 @@ class SentinelLocWarning(CompilOutputCat, CompilMsg):
class
SentinelWarning
(
CompilOutputCat
,
CompilMsg
):
"""
Warning
"""
id
=
"
W9993
"
...
...
@@ -126,7 +117,6 @@ class SentinelWarning(CompilOutputCat, CompilMsg):
class
UnclassifiableStatement
(
CompilOutputCat
,
CompilMsg
):
"""
Unclassifiable statement
"""
id
=
"
E0001
"
...
...
@@ -135,7 +125,6 @@ class UnclassifiableStatement(CompilOutputCat, CompilMsg):
class
InvalidCharacter
(
CompilOutputCat
,
CompilMsg
):
"""
Invalid character
"""
id
=
"
E0002
"
...
...
@@ -144,7 +133,6 @@ class InvalidCharacter(CompilOutputCat, CompilMsg):
class
InvalidUnit
(
CompilOutputCat
,
CompilMsg
):
"""
Invalid unit
"""
id
=
"
E0003
"
...
...
@@ -153,7 +141,6 @@ class InvalidUnit(CompilOutputCat, CompilMsg):
class
LineTruncated
(
CompilOutputCat
,
CompilMsg
):
"""
Line truncated
"""
id
=
"
C0004
"
...
...
@@ -162,7 +149,6 @@ class LineTruncated(CompilOutputCat, CompilMsg):
class
XDescriptor
(
CompilOutputCat
,
CompilMsg
):
"""
Invalid X descriptor
"""
id
=
"
C0005
"
...
...
@@ -171,7 +157,6 @@ class XDescriptor(CompilOutputCat, CompilMsg):
class
InvalidStatement
(
CompilOutputCat
,
CompilMsg
):
"""
Invalid form of statement
"""
id
=
"
E0006
"
...
...
@@ -180,7 +165,6 @@ class InvalidStatement(CompilOutputCat, CompilMsg):
class
ContinousMarkerMissing
(
CompilOutputCat
,
CompilMsg
):
"""
Missing continous character
'
&
'"""
id
=
"
W0007
"
...
...
@@ -192,7 +176,6 @@ class ContinousMarkerMissing(CompilOutputCat, CompilMsg):
class
TypeMismatch
(
CompilOutputCat
,
CompilMsg
):
"""
Type mismatch
"""
id
=
"
E0101
"
...
...
@@ -203,7 +186,6 @@ class TypeMismatch(CompilOutputCat, CompilMsg):
class
RankMismatch
(
CompilOutputCat
,
CompilMsg
):
"""
Rank mismatch
"""
id
=
"
E0103
"
...
...
@@ -229,7 +211,6 @@ class RankMismatch(CompilOutputCat, CompilMsg):
class
DummyArgument
(
CompilOutputCat
,
CompilMsg
):
"""
Dummy argument
"""
id
=
"
W0104
"
...
...
@@ -252,7 +233,6 @@ class DummyArgument(CompilOutputCat, CompilMsg):
class
TooFewElements
(
CompilOutputCat
,
CompilMsg
):
"""
Too few elements in argument
"""
id
=
"
E0105
"
...
...
@@ -265,7 +245,6 @@ class TooFewElements(CompilOutputCat, CompilMsg):
class
TooManyArgs
(
CompilOutputCat
,
CompilMsg
):
"""
Too many arguments
"""
id
=
"
E0106
"
...
...
@@ -274,18 +253,14 @@ class TooManyArgs(CompilOutputCat, CompilMsg):
class
NotEnoughArgs
(
CompilOutputCat
,
CompilMsg
):
"""
Not enough arguments
"""
id
=
"
E0107
"
fmt
=
"
%(id)s: %(label)s at %(line)s,%(col)s: call to %(elt)r,
"
"
missing %(arg)r
"
search
=
search_loc_msg
(
"
Missing actual argument
'
(?P<arg>.*?)
'
"
"
in call to
'
(?P<elt>.*?)
'
at
"
)
search
=
search_loc_msg
(
"
Missing actual argument
'
(?P<arg>.*?)
'
in call to
'
(?P<elt>.*?)
'
at
"
)
class
UninitializedVariable
(
CompilOutputCat
,
CompilMsg
):
"""
Uninitialized variable
"""
id
=
"
C0108
"
...
...
@@ -294,7 +269,6 @@ class UninitializedVariable(CompilOutputCat, CompilMsg):
class
MaybeUninitializedVariable
(
CompilOutputCat
,
CompilMsg
):
"""
Maybe uninitialized variable
"""
id
=
"
C0109
"
...
...
@@ -302,11 +276,20 @@ class MaybeUninitializedVariable(CompilOutputCat, CompilMsg):
search
=
search_loc_msg
(
"
.*?(?P<arg>\w+).*? may be used uninitialized
"
)
class
TooLargeArraysOnStack
(
CompilOutputCat
,
CompilMsg
):
"""
Array is larger than limit on stack
"""
id
=
"
C0110
"
fmt
=
"
%(id)s: %(label)s at %(line)s,%(col)s: %(arg)r
"
search
=
search_loc_msg
(
"
Array
'
(?P<arg>.*?)
'
at .* is larger than limit set by .*\-fmax\-stack\-var\-size
"
)
# types errors
class
PossibleChangeConversion
(
CompilOutputCat
,
CompilMsg
):
"""
Possible change of value in conversion
"""
id
=
"
W0202
"
...
...
@@ -315,7 +298,6 @@ class PossibleChangeConversion(CompilOutputCat, CompilMsg):
class
ImplicitType
(
CompilOutputCat
,
CompilMsg
):
"""
No implicit type
"""
id
=
"
E0203
"
...
...
@@ -324,7 +306,6 @@ class ImplicitType(CompilOutputCat, CompilMsg):
class
OperandsInComparison
(
CompilOutputCat
,
CompilMsg
):
"""
Operands of comparison operator mismatch
"""
id
=
"
W0204
"
...
...
@@ -335,7 +316,6 @@ class OperandsInComparison(CompilOutputCat, CompilMsg):
class
SameArgInOut
(
CompilOutputCat
,
CompilMsg
):
"""
Same variable used for IN and OUT argument
The same variable is used for an input and an output argument.
"""
...
...
@@ -348,7 +328,6 @@ class SameArgInOut(CompilOutputCat, CompilMsg):
class
Misalignment
(
CompilOutputCat
,
CompilMsg
):
"""
Problem of alignment of variables
"""
id
=
"
W0206
"
...
...
@@ -360,7 +339,6 @@ class Misalignment(CompilOutputCat, CompilMsg):
class
ArrayOutOfBounds
(
CompilOutputCat
,
CompilMsg
):
"""
Array accessed out of its bounds
"""
id
=
"
C0207
"
...
...
@@ -374,7 +352,6 @@ class ArrayOutOfBounds(CompilOutputCat, CompilMsg):
class
DuplicateExternal
(
CompilOutputCat
,
CompilMsg
):
"""
Duplicate external declaration
"""
id
=
"
E0301
"
...
...
@@ -385,7 +362,6 @@ class DuplicateExternal(CompilOutputCat, CompilMsg):
class
UnusedVar
(
CompilOutputCat
,
CompilMsg
):
"""
Unused variable
"""
id
=
"
W0302
"
...
...
@@ -394,7 +370,6 @@ class UnusedVar(CompilOutputCat, CompilMsg):
class
UnusedParam
(
CompilOutputCat
,
CompilMsg
):
"""
Unused parameter
"""
id
=
"
C0303
"
...
...
@@ -403,7 +378,6 @@ class UnusedParam(CompilOutputCat, CompilMsg):
class
UnusedLabel
(
CompilOutputCat
,
CompilMsg
):
"""
Unused label
"""
id
=
"
C0304
"
...
...
@@ -412,7 +386,6 @@ class UnusedLabel(CompilOutputCat, CompilMsg):
class
UsedBeforeTyped
(
CompilOutputCat
,
CompilMsg
):
"""
Symbol used before being typed
"""
id
=
"
C0305
"
...
...
@@ -421,7 +394,6 @@ class UsedBeforeTyped(CompilOutputCat, CompilMsg):
class
ExpectedDimension
(
CompilOutputCat
,
CompilMsg
):
"""
Expected another dimension in array declaration
"""
id
=
"
E0306
"
...
...
@@ -430,7 +402,6 @@ class ExpectedDimension(CompilOutputCat, CompilMsg):
class
UnusedParameter
(
CompilOutputCat
,
CompilMsg
):
"""
Unused (function) parameter
"""
id
=
"
W0307
"
...
...
@@ -441,7 +412,6 @@ class UnusedParameter(CompilOutputCat, CompilMsg):
class
ImplicitInterface
(
CompilOutputCat
,
CompilMsg
):
"""
Call with an implicit interface
An explicit interface must be defined to call an external subprogram.
You must add the corresponding include statement for this subprogram.
"""
...
...
@@ -455,7 +425,6 @@ class ImplicitInterface(CompilOutputCat, CompilMsg):
class
NoTabs
(
CompilOutputCat
,
CompilMsg
):
"""
Nonconforming tab character
"""
id
=
"
C0401
"
...
...
@@ -466,7 +435,6 @@ class NoTabs(CompilOutputCat, CompilMsg):
class
CharacterTruncated
(
CompilOutputCat
,
CompilMsg
):
"""
Character will be truncated
"""
id
=
"
W0402
"
...
...
@@ -482,7 +450,6 @@ class CharacterTruncated(CompilOutputCat, CompilMsg):
class
CharacterTruncatedSure
(
CompilOutputCat
,
CompilMsg
):
"""
Character is truncated
"""
id
=
"
C0403
"
...
...
@@ -493,7 +460,6 @@ class CharacterTruncatedSure(CompilOutputCat, CompilMsg):
class
ObsolescentFeature
(
CompilOutputCat
,
CompilMsg
):
"""
Obsolescent feature
Source code may not work unaltered with modern compilers.
See http://fortranwiki.org/fortran/show/Modernizing+Old+Fortran
...
...
@@ -516,7 +482,6 @@ class ObsolescentFeature(CompilOutputCat, CompilMsg):
class
EquivalenceMixingTypes
(
CompilOutputCat
,
CompilMsg
):
"""
Equivalence between different types
"""
id
=
"
W0405
"
...
...
@@ -527,7 +492,6 @@ class EquivalenceMixingTypes(CompilOutputCat, CompilMsg):
class
MissingComma
(
CompilOutputCat
,
CompilMsg
):
"""
Missing comma
"""
id
=
"
E0406
"
...
...
@@ -536,7 +500,6 @@ class MissingComma(CompilOutputCat, CompilMsg):
class
NonStdDeclaration
(
CompilOutputCat
,
CompilMsg
):
"""
Nonstandard type declaration
"""
id
=
"
C0407
"
...
...
@@ -545,7 +508,6 @@ class NonStdDeclaration(CompilOutputCat, CompilMsg):
class
HollerithConstant
(
CompilOutputCat
,
CompilMsg
):
"""
Deprecated Hollerith constant
"""
id
=
"
C0408
"
...
...
@@ -554,7 +516,6 @@ class HollerithConstant(CompilOutputCat, CompilMsg):
class
DeletedFeature
(
CompilOutputCat
,
CompilMsg
):
"""
Deleted feature
"""
id
=
"
W0409
"
...
...
@@ -563,7 +524,6 @@ class DeletedFeature(CompilOutputCat, CompilMsg):
class
ArrayIndex
(
CompilOutputCat
,
CompilMsg
):
"""
Unexpected type for array index
"""
id
=
"
C0410
"
...
...
@@ -574,7 +534,6 @@ class ArrayIndex(CompilOutputCat, CompilMsg):
class
RealArrayIndex
(
CompilOutputCat
,
CompilMsg
):
"""
Real array index
"""
id
=
"
C0411
"
...
...
@@ -583,7 +542,6 @@ class RealArrayIndex(CompilOutputCat, CompilMsg):
class
DoubleComplex
(
CompilOutputCat
,
CompilMsg
):
"""
Double complex
"""
id
=
"
C0412
"
...
...
@@ -592,7 +550,6 @@ class DoubleComplex(CompilOutputCat, CompilMsg):
class
ComparisonBetweenReal
(
CompilOutputCat
,
CompilMsg
):
"""
Equality/inequality comparison for floating-point numbers
It is unsafe to rely on exact floating-point comparisons. Slight variations
in rounding can change the outcome of such comparisons, leading to
...
...
@@ -621,7 +578,6 @@ class ComparisonBetweenReal(CompilOutputCat, CompilMsg):
class
UnaryOpAfterArithmeticOp
(
CompilOutputCat
,
CompilMsg
):
"""
Unary operator following arithmetic operator
The same code may be compiled differently by different compilers.
Example: ``d1=a**-2*b`` gets interpretted as ``d1=a**(-2*b)`` by ifort but
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment