Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ICE on duplicate compilation of ExternBlock items #1391

Merged
merged 1 commit into from
Jul 17, 2022
Merged

Conversation

philberty
Copy link
Member

When we declare an extern block after where it is used the query
compilation system in the backend code-gen pass will resolve this and
compile as required. But when the iteration of the crate as part of the
pipeline we end up compiling this function again. The check we used to stop
this was copy paste from the other function items but in this case the
check for function_completed is not valid as this is a prototype for an
extern item so we dont add this to the translation unit as an fndecl which
meant we hit the ICE where we compile and add it again.

Fixes #1323

When we declare an extern block after where it is used the query
compilation system in the backend code-gen pass will resolve this and
compile as required. But when the iteration of the crate as part of the
pipeline we end up compiling this function again. The check we used to stop
this was copy paste from the other function items but in this case the
check for function_completed is not valid as this is a prototype for an
extern item so we dont add this to the translation unit as an fndecl which
meant we hit the ICE where we compile and add it again.

Fixes #1323
@philberty
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 17, 2022

Build succeeded:

@bors bors bot merged commit e4cdb24 into master Jul 17, 2022
@philberty philberty deleted the phil/ice-extern branch July 17, 2022 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE on print array access
1 participant