Skip to content

return statement is ignored #60345

@lgoettgens

Description

@lgoettgens

Since very recently, we are experiencing correctness changes in our code at https://github.com/oscar-system/Oscar.jl (cf. oscar-system/Oscar.jl#5630)

I did not manage to work out a completely minimal mwe, but it is at least reproducible.

After loading Oscar (v1.6.0 or oscar-system/Oscar.jl@707dd22), do

julia> G = small_group(8,4);

julia> G = Oscar._Riese_Schmid_type(G)

Up to nightly 1.14.0-DEV.1347, this returned ("Q8", 1) from https://github.com/oscar-system/Oscar.jl/blob/ada3da89ea8cb9cccb57ba35ae96c36d06f0a82b/src/Groups/schur_index.jl#L60. In nightly 1.14.0-DEV.1348, this now returns ("Q8", 2757).
The main issue here is that (according to some @show statements added to the code) the condition in https://github.com/oscar-system/Oscar.jl/blob/ada3da89ea8cb9cccb57ba35ae96c36d06f0a82b/src/Groups/schur_index.jl#L60 is still true, and even the branch containing the return ("Q8", 1) gets executed, but afterwards the remainder of the function is still executed (which eventually results in the other return value.
When trying to remove parts of the function to simplify everything, it started to work as expected again.

From the nightly versions involved, this should have something to do with #55045 (ping @topolarity @vtjnash )

cc @benlorenz @fingolfin @ThomasBreuer

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorcompiler:codegenGeneration of LLVM IR and native code

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions