crystal_lib icon indicating copy to clipboard operation
crystal_lib copied to clipboard

cannot find type for long long (Vector)

Open jkthorne opened this issue 4 years ago • 0 comments

I cannot parse long long (Vector) with this lib. I think this might be a problem with the Crystal compiler but I dont know

@[Include(
  "immintrin.h",
)]
lib Immintrin
end
crystal build src/main.cr --mattr avx
./main examples/lib_simd.cr
Unhandled exception: Don't know how to convert __attribute__((__vector_size__(1 * sizeof(long long)))) long long (Vector) (Exception)
  from src/crystal_lib/parser.cr:298:7 in 'type'
  from src/crystal_lib/parser.cr:145:5 in 'visit_typedef_declaration'
  from src/crystal_lib/parser.cr:80:7 in 'visit'
  from src/crystal_lib/parser.cr:39:7 in '->'
  from /usr/local/Cellar/crystal/1.2.1/src/primitives.cr:266:3 in '->'
  from _ZN5clang8cxcursor13CursorVisitor5VisitE8CXCursorb
  from _ZN5clang8cxcursor13CursorVisitor23handleDeclForVisitationEPKNS_4DeclE
  from _ZN5clang8cxcursor13CursorVisitor16VisitDeclContextEPNS_11DeclContextE
  from _ZN5clang8cxcursor13CursorVisitor13VisitChildrenE8CXCursor
  from clang_visitChildren
  from lib/clang/src/cursor.cr:36:7 in 'visit_children'
  from src/crystal_lib/parser.cr:38:5 in 'parse'
  from src/crystal_lib/parser.cr:15:5 in 'parse'
  from src/crystal_lib/lib_transformer.cr:18:5 in 'transform'
  from /usr/local/Cellar/crystal/1.2.1/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
  from /usr/local/Cellar/crystal/1.2.1/src/compiler/crystal/syntax/transformer.cr:23:9 in 'transform'
  from /usr/local/Cellar/crystal/1.2.1/src/compiler/crystal/syntax/transformer.cr:7:14 in 'transform'
  from src/main.cr:5:1 in '__crystal_main'
  from /usr/local/Cellar/crystal/1.2.1/src/crystal/main.cr:110:5 in 'main_user_code'
  from /usr/local/Cellar/crystal/1.2.1/src/crystal/main.cr:96:7 in 'main'
  from /usr/local/Cellar/crystal/1.2.1/src/crystal/main.cr:119:3 in 'main'

jkthorne avatar Nov 05 '21 18:11 jkthorne