Skip to content

ModuleOption PolyRatFun with its inverse #763

@tueda

Description

@tueda

Currently, the reference manual says:

polyratfun

Possibly followed by the name of a `polyratfun'. Is similar to the polyfun statement (see 7.114) but only valid for the current module. If there is second name, it refers to the inverse polyratfun. More complicated options of the polyratfun statement cannot be used here.

But the following program crashes:

CF rat,RAT;
ModuleOption polyratfun rat,RAT;
.end
FORM 5.0.0-beta.1 (Dec 19 2025, v5.0.0-beta.1-288-g73a6a14)  Run: Fri Jan  9 20:45:38 2026
    CF rat,RAT;
    ModuleOption polyratfun rat,RAT;
==42715== Conditional jump or move depends on uninitialised value(s)
==42715==    at 0x4065609: SkipAName (compiler.c:437)
==42715==    by 0x40AFD3A: CoModuleOption (module.c:157)
==42715==    by 0x4065E25: CompileStatement (compiler.c:663)
==42715==    by 0x4111458: PreProcessor (pre.c:1130)
==42715==    by 0x415399D: main (startup.c:1766)
==42715==
==42715== Use of uninitialised value of size 8
==42715==    at 0x4065615: SkipAName (compiler.c:445)
==42715==    by 0x40AFD3A: CoModuleOption (module.c:157)
==42715==    by 0x4065E25: CompileStatement (compiler.c:663)
==42715==    by 0x4111458: PreProcessor (pre.c:1130)
==42715==    by 0x415399D: main (startup.c:1766)

Actually, from the current implementation, the correct syntax seems to be:

CF rat,RAT;
ModuleOption polyratfun rat+RAT;
.end

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