Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:25
erlang
0339-Fix-bad_typed_register-failure.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0339-Fix-bad_typed_register-failure.patch of Package erlang
From 23747cda05c083a646c0622379d5558776c04d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Sat, 3 Jun 2023 07:25:26 +0200 Subject: [PATCH] Fix bad_typed_register failure Closes #7354 --- lib/compiler/src/beam_ssa.erl | 2 +- lib/compiler/test/beam_ssa_SUITE.erl | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/compiler/src/beam_ssa.erl b/lib/compiler/src/beam_ssa.erl index 194fab2242..d4f4f088c6 100644 --- a/lib/compiler/src/beam_ssa.erl +++ b/lib/compiler/src/beam_ssa.erl @@ -381,7 +381,7 @@ normalize(#b_set{anno=Anno0,op={bif,Bif},args=Args}=Set) -> #{1 := Type} -> Anno0#{arg_types => #{0 => Type}}; #{} -> - Anno0 + Anno0#{arg_types => #{}} end; #{} -> Anno0 diff --git a/lib/compiler/test/beam_ssa_SUITE.erl b/lib/compiler/test/beam_ssa_SUITE.erl index c64dc3ad5d..2da96cbbd6 100644 --- a/lib/compiler/test/beam_ssa_SUITE.erl +++ b/lib/compiler/test/beam_ssa_SUITE.erl @@ -1252,6 +1252,16 @@ normalize_swapped(Op, [#b_literal{}=Lit,#b_var{}=Var]=Args) -> I2 = make_bset(ArgTypes0, Op, Args), {[{0,IntRange}],Op,[Var,Lit]} = unpack_bset(beam_ssa:normalize(I2)), + LitType = beam_types:make_type_from_value(Lit), + + ArgTypes1 = [{0,LitType}], + I3 = make_bset(ArgTypes1, Op, Args), + {[],Op,[Var,Lit]} = unpack_bset(beam_ssa:normalize(I3)), + + ArgTypes2 = [{0,LitType},{1,IntRange}], + I4 = make_bset(ArgTypes1, Op, Args), + {[],Op,[Var,Lit]} = unpack_bset(beam_ssa:normalize(I4)), + ok. make_bset(ArgTypes, Op, Args) when is_list(ArgTypes) -> -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor