Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug in class_constructor pass #2154

Open
@Smit-create

Description

@Smit-create

Consider the example of integration_tests/structs_17.py. The ASR after pass class_constructor has the following:

1_C_cz:
                                                (ExternalSymbol
                                                    6
                                                    1_C_cz
                                                    3 cz
                                                    1_C
                                                    []
                                                    cz
                                                    Public
                                                ),

where cz is

cz:
                                                                (Variable
                                                                    3
                                                                    cz
                                                                    []
                                                                    Local
                                                                    ()
                                                                    ()
                                                                    Default
                                                                    (Real 4)
                                                                    ()
                                                                    Source
                                                                    Public
                                                                    Required
                                                                    .false.
                                                                )

and 1_C is

1_C:
                                (ExternalSymbol
                                    12
                                    1_C
                                    2 C
                                    B
                                    []
                                    C
                                    Public
                                )

Now, I think according the ExternalSymbol's definition, 1_C should be a module (or struct as it's used in many places), but I think it should not be an ExternalSymbol as seen above. This might be a bug which isn't noticed by verify too.

This is the reason for a test failing in #2149

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions