Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • RefinedC RefinedC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Iris
  • RefinedCRefinedC
  • Merge requests
  • !131

Fix res_ty for rc_annot

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Michael Sammler requested to merge ci/fix-res-ty into master Feb 23, 2022
  • Overview 2
  • Commits 1
  • Pipelines 1
  • Changes 2

Without this MR code like

u16 rateval = rc_bitfield_init(u16, "rate_sig");

generates

f_code := (
      <[ "#0" :=
        "rateval" <-{ IntOp u16 }
          LocInfoE loc_708 (UnOp (CastOp $ IntOp u16) (IntOp i32) (LocInfoE loc_708 (AnnotExpr 1%nat (BitfieldInitAnnot (rate_sig)) (LocInfoE loc_709 (UnOp (CastOp $ IntOp u16) (IntOp i32) (LocInfoE loc_710 (i2v 0 i32))))))) ;

Note that this contains a cast too much.

This MR fixes this issue and a similar issue for the ternary operator.

@lepigre Does this fix make sense?

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ci/fix-res-ty