LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 36323 - Issues with C99 VLA implementation
Summary: Issues with C99 VLA implementation
Status: NEW
Alias: None
Product: clang
Classification: Unclassified
Component: LLVM Codegen (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P enhancement
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-09 11:22 PST by Paul Robinson
Modified: 2018-02-13 01:54 PST (History)
6 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Robinson 2018-02-09 11:22:17 PST
I've spun this off from bug 36322 to track additional issues with
the current implementation of DWARF descriptions of C99 VLAs.

Initially I was curious what happened if a function with a VLA was
inlined into another function.  Adrian Prantl pointed out the test
  llvm/test/DebugInfo/X86/vla-dependencies.ll
which I started playing with.

Even without optimization, some curious things happen.
The subrange_type has a DW_AT_type which points to something called 
"sizetype" which does not exist in the source.  It also doesn't share 
an abbrev with the other base types, because its attributes are in a 
different order; this suggests some poor internal coding practice at least, 
although it's not actually invalid DWARF.

With optimization, LLVM asserts, which is worth its own bug.