After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 609440 - f().length compiles to nothing
f().length compiles to nothing
Status: RESOLVED DUPLICATE of bug 602208
Product: vala
Classification: Core
Component: Arrays
0.7.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-09 17:09 UTC by Ilya Mezhirov
Modified: 2010-03-26 19:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ilya Mezhirov 2010-02-09 17:09:43 UTC
Version: vala-0.7.10.

Code to reproduce:
_________________________________

int[] f()
{
    return new int[10];
}

void main()
{
    stdout.printf("%d\n", f().length);
}
_________________________________

This does not call f() at all and prints a random number. C code of main() looks like this:

_________________________________

        gint _tmp0_;
        fprintf (stdout, "%d\n", _tmp0_);
_________________________________
Comment 1 Jürg Billeter 2010-03-26 19:16:26 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 602208 ***