This is an archive of the discontinued LLVM Phabricator instance.

[flang] Change internal errors in RESHAPE runtime routine to user errors
ClosedPublic

Authored by PeteSteinfeld on Feb 11 2022, 2:53 PM.

Details

Summary

There are several checks in the runtime routine for the RESHAPE
intrinsic. Some checks verify things that should have been checked at
compile time while others represent user errors.

This update changes the checks for user errors into calls to "Crash"
which include information about the failing check. This identifies them
as user errors rather than compiler errors.

I also verified that the checks that remain as internal errors are also
checked by the front end. I added a test to the front end's RESHAPE
test to complete the checks.

Diff Detail

Event Timeline

PeteSteinfeld created this revision.Feb 11 2022, 2:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2022, 2:53 PM
PeteSteinfeld requested review of this revision.Feb 11 2022, 2:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2022, 2:53 PM
klausler accepted this revision.Feb 11 2022, 2:58 PM
This revision is now accepted and ready to land.Feb 11 2022, 2:58 PM
This revision was landed with ongoing or failed builds.Feb 11 2022, 3:52 PM
This revision was automatically updated to reflect the committed changes.