www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - String assignment bug

Hi, compile the following with the -O flag:

# void main()
# {
#   char[4] a, b;
#   a[] = 'a'; b[] = 'a'; // These work
#
#   a[] = b[] = 'a'; // Segmentation fault
# }

It works ok for ints, strange enough. Using 0.127 on linux.

Nick
Jun 24 2005