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

getelementptr gets confused with nested type #1494

Closed
llvmbot opened this issue Jan 18, 2007 · 2 comments
Closed

getelementptr gets confused with nested type #1494

llvmbot opened this issue Jan 18, 2007 · 2 comments
Labels
bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead llvm-tools All llvm tools that do not have corresponding tag

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jan 18, 2007

Bugzilla Link 1122
Resolution FIXED
Resolved on Nov 07, 2018 00:17
Version trunk
OS Linux
Attachments .ll that currently fails with llvm-upgrade
Reporter LLVM Bugzilla Contributor

Extended Description

llvm-upgrade gives this error when upgrading the attached .ll file.

llvm-upgrade: testme.ll:9: error: Invalid type for index while reading token: '%source1'

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jan 19, 2007

Please note that llvm-upgrade is undergoing major surgery. Related issues are:

bug 645 and bug 1082

These will be resolved in the next week or so.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jan 26, 2007

The recent re-write of llvm-upgrade should have fixed this but. It no longer
gives the error and produces this output for the attached test case:

; ModuleID = ''
%RPyString = type { i32, %arraytype_Char_1 }
%arraytype_Char_1 = type { i32, [0 x i8] }
%structtype_rpy_string = type { i32, %arraytype_Char_1 }

implementation ; Functions:

define i8* @​RPyString_AsString(%RPyString* %structstring) {
%source1ptr = getelementptr %RPyString* %structstring, i32 0, i32 1, i32
1 ; <[0 x i8]> [#uses=1]
%source1 = bitcast [0 x i8]
%source1ptr to i8* ; <i8*> [#uses=1]
ret i8* %source1
}

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead llvm-tools All llvm tools that do not have corresponding tag
Projects
None yet
Development

No branches or pull requests

1 participant