# nvcc segfault in Code\_Expansion phase

**URL:** <https://forums.developer.nvidia.com/t/nvcc-segfault-in-code-expansion-phase/17312>\
**Category:** CUDA Programming and Performance\
**Created:** [June 24, 2010, 12:47pm UTC](https://forums.developer.nvidia.com/t/nvcc-segfault-in-code-expansion-phase/17312 "2010-06-24T12:47:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![graham\_old](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@graham\_old](https://forums.developer.nvidia.com/u/graham_old)\
**Post date:** [June 24, 2010, 12:47pm UTC](https://forums.developer.nvidia.com/t/nvcc-segfault-in-code-expansion-phase/17312/1 "2010-06-24T12:47:05Z")

</div>

Hi,

When attempting to compile the following minimal test case:

> [@](#):
>
> **global** void test(int n)
> 
> {
> 
> int a[n];
> 
> }

The nvcc compiler segfaults with the following message:

> [@](#):
>
> Signal: Segmentation fault in Code\_Expansion phase.
> 
> (0): Error: Signal Segmentation fault in phase Code\_Expansion – processing aborted
> 
> \*\*\* Internal stack backtrace:
> 
> ```
> /usr/local/cuda/open64/lib//be [0x6d1c6f]
> 
> /usr/local/cuda/open64/lib//be [0x6d28b9]
> 
> /usr/local/cuda/open64/lib//be [0x6d200d]
> 
> /usr/local/cuda/open64/lib//be [0x6d3256]
> 
> /lib/libc.so.6 [0x2b7bed394040]
> 
> /usr/local/cuda/open64/lib//be [0x5461f9]
> 
> /usr/local/cuda/open64/lib//be [0x5740fc]
> 
> /usr/local/cuda/open64/lib//be [0x570b3c]
> 
> /usr/local/cuda/open64/lib//be [0x571fb1]
> 
> /usr/local/cuda/open64/lib//be [0x570b28]
> 
> /usr/local/cuda/open64/lib//be [0x57573b]
> 
> /usr/local/cuda/open64/lib//be [0x576269]
> 
> /usr/local/cuda/open64/lib//be [0x57688c]
> 
> /usr/local/cuda/open64/lib//be [0x552722]
> 
> /usr/local/cuda/open64/lib//be [0x405443]
> 
> /usr/local/cuda/open64/lib//be [0x4061f1]
> 
> /usr/local/cuda/open64/lib//be [0x40752d]
> 
> /lib/libc.so.6(__libc_start_main+0xe6) [0x2b7bed37f5a6]
> 
> /usr/local/cuda/open64/lib//be [0x4038da]
> 
> ```
> 
> nvopencc INTERNAL ERROR: /usr/local/cuda/open64/lib//be died due to signal 4

This is with the most recent version of the CUDA toolkit:

> [@](#):
>
> nvcc: NVIDIA ® Cuda compiler driver
> 
> Copyright © 2005-2009 NVIDIA Corporation
> 
> Built on Fri\_Feb\_19\_19:12:59\_PST\_2010
> 
> Cuda compilation tools, release 3.0, V0.2.1221

I suspect that this is not actually allowed anyway, and automatic arrays must have bounds that are constant at compile time. Is this correct?
