Skip to content
Snippets Groups Projects

Hotfix arithmetic bug

Merged Yen-Chen Chen requested to merge hotfix_arithmetic_bug into master
1 unresolved thread

There is a bug in util_arithmetic_expr that compares a pointer to a string.
This bug results in the function left_associative not working as expected.
And therefore produces wrong expression results for complicated expressions with ^ operators.

The test TEST_exr_3 + 4*2/(1 - 5)^2^3 is a very good example.
When we use left-associative (default for C) for the power operator, the expression x^2^3 should be (x^2)^3=x^6.
When we use right-associative (default for Fortran) for the power operator, the expression x^2^3 should be x^(2^3)=x^8.
This branch fixes this bug.

Additionally, this branch also fixed the problem that the Ragel state machine no longer compiles the *.rl files.
This branch also updates FortUTF to the latest version.

Edited by Yen-Chen Chen

Merge request reports

Pipeline #41517 passed

Pipeline passed for 8e51431e on hotfix_arithmetic_bug

Approval is optional

Merged by Yen-Chen ChenYen-Chen Chen 1 year ago (Jul 31, 2023 3:04pm UTC)

Merge details

  • Changes merged into master with 8137bc69 (commits were squashed).
  • Deleted the source branch.

Pipeline #41532 passed

Pipeline passed for 8137bc69 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading