Skip to content

c_import: a field written through a call's result goes through its dereference, and an untranslated call names its callee - #3590

Merged
ehartford merged 1 commit into
mainfrom
slist
Nov 24, 2026
Merged

ehartford merged 1 commit into
mainfrom
slist

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Two importer defects found while building the fixture for the linked-list facade shape. No issue was open for either.

1. f(x)->field = v in an inline C body. Translated as f(x).field = v and refused: "cannot assign to a non-place expression". The pointer a call returns is no place, so the field is now written through its dereference. A named pointer (p->field = v) is unchanged.

2. An untranslated call was reported by a number. An inline body with d = strdup(s) was omitted with "unsupported assignment rhs in goto CFG (kind=103)". It now says: the call of strdup has no translation: a system function std.libc does not bind is one such.

Tests: behav_c_import_field_through_call_result (plain and compound assignment, and the read; fails on main), err_c_import_inline_body_calls_unbound_system_function.

Evidence at 21a3225: :native-compile-error-tests, :behavior-tests, :validate-all-tests, pre-checks green; battery green; linux-aarch64 container leg green (:build, :behavior-tests, :native-compile-error-tests); :release-checks survey: all targets green.

…reference, and an untranslated call names its callee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant