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

Do not reap module that contain a single type definition #6570

Merged
merged 2 commits into from
Jun 29, 2017

Conversation

noakesmichael
Copy link
Contributor

Before this PR deadCodeElimination would generate an internal error if it encountered
a module with precisely 1 definition and that definition was not the module init function.

Meanwhile the compiler will remove the module init function for a module that consists
solely of type declarations. The edge case for deadModule() is then a module with a
single type declaration.

This simple PR merely accepts this edge case and retains the type and the module.
More analysis could be used to determine if it is safe to remove the type and then the
module.

It also retires the future that had been created for this edge case.

Compiled with/without CHPL_DEVELOPER on clang/darwin and gcc/linux64.
Ran start_test over a small portion of release/ for all 4 configurations.
Passed a single-locale paratest on gcc/linux64 with futures.

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