[Issue 3701] New: Incorrect initialisation of static arrays of floating-point values

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 13 00:35:20 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3701

           Summary: Incorrect initialisation of static arrays of
                    floating-point values
           Product: D
           Version: 2.038
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bugzilla at kyllingen.net


--- Comment #0 from Lars T. Kyllingstad <bugzilla at kyllingen.net> 2010-01-13 00:35:18 PST ---
Example code:

  import std.stdio;

  void main()
  {
      float[1] a;
      writeln(a[0]);

      double[1] b;
      writeln(b[0]);

      real[1] c;
      writeln(c[0]);
  }

One expects this program to print "nan" three times, instead it prints:

  0
  0
  3.35109e-4932

It doesn't matter how long the arrays are, all the elements have the same
value.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list