Skip to content

Can't use named primitive type in structure definition #3105

@llvmbot

Description

@llvmbot
Bugzilla Link 2733
Resolution FIXED
Resolved on Oct 15, 2008 01:17
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @lattner

Extended Description

Here is some .ll code:

%t1 = type i32
%t2 = type { %t1 }
@​i1 = constant %t2 { %t1 15 } ; ERROR
@​i2 = constant %t2 { i32 15 } ; NO ERROR

@​i1 will not compile, with the following error:
error: syntax error, unexpected EUINT64VAL, expecting '*' while reading token: '15'

@​i2 compiles just fine.

Expected behavior is that both @​i1 and @​i2 would compile equally well. Using %t1 in the definition of type %t2 works, so, by analogy, using it in the definition of @​i1 should work as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions