-
Notifications
You must be signed in to change notification settings - Fork 693
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
Type coercion into scalar fails with internal compiler error #3973
Comments
Actually... never mind on that... After PR #3991, this code causes a different error to arise in the compiler. I'll get on that too. |
llvm-beanz
added a commit
to llvm-beanz/DirectXShaderCompiler
that referenced
this issue
Oct 11, 2021
When resolving template argument types if the originating type is a literal type (i.e. `literal float` or `literal int`), we should instead substitute the appropriate 32-bit type. This change is two pieces: The first translates template arguments from `literal <x>` into the appropriate 32-bit type after deduction but before generating the instantiated decl for non-builtin templates. The second part allows `literal <x>` template parameters to match against the appropriate instantiated 32-bit types. This resolves microsoft#3973.
llvm-beanz
added a commit
that referenced
this issue
Oct 11, 2021
When resolving template argument types if the originating type is a literal type (i.e. `literal float` or `literal int`), we should instead substitute the appropriate 32-bit type. This change is two pieces: The first translates template arguments from `literal <x>` into the appropriate 32-bit type after deduction but before generating the instantiated decl for non-builtin templates. The second part allows `literal <x>` template parameters to match against the appropriate instantiated 32-bit types. This resolves #3973.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Implicit narrowing conversions into a scalar type seem to cause
Internal Compiler error: llvm::cast<X>() argument of incompatible type!
. Doesn't appear to happen when coercing into a vector type.Minimal example, reproduces with dndxc.exe from de6a8ed's AppVeyor build
Fails:
-enable-templates -DFAILURE_CASE
Compiles:
-enable-templates
The text was updated successfully, but these errors were encountered: