control-flow/nested-conditional.vala \
control-flow/null-conditional-bool.vala \
control-flow/pre-post-increment.vala \
+ control-flow/pre-post-increment-array-index.vala \
control-flow/pre-post-increment-field.vala \
control-flow/pre-post-increment-local.vala \
control-flow/pre-post-increment-parameter.vala \
gint* _tmp0_;
gint a_length1;
gint _a_size_;
- gint* _tmp1_;
- gint _tmp1__length1;
+ gint _tmp1_;
gint _tmp2_;
- gint _tmp3_;
_tmp0_ = g_new0 (gint, 1);
a = _tmp0_;
a_length1 = 1;
_a_size_ = a_length1;
- _tmp1_ = a;
- _tmp1__length1 = a_length1;
- _tmp2_ = _tmp1_[0];
- _tmp1_[0] = _tmp2_ + 1;
- _tmp3_ = a[0];
- _vala_assert (_tmp3_ == 1, "a[0] == 1");
+ _tmp1_ = a[0];
+ a[0] = _tmp1_ + 1;
+ _tmp2_ = a[0];
+ _vala_assert (_tmp2_ == 1, "a[0] == 1");
a = (g_free (a), NULL);
}
--- /dev/null
+/* control_flow_pre_post_increment_array_index.c generated by valac, the Vala compiler
+ * generated from control_flow_pre_post_increment_array_index.vala, do not modify */
+
+#include <glib.h>
+
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
+#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
+#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+static void _vala_main (void);
+
+static void
+_vala_main (void)
+{
+ gchar foo[4] = {0};
+ gint i = 0;
+ gint _tmp0_;
+ gint _tmp1_;
+ gint _tmp2_;
+ foo[4] = '\0';
+ i = 0;
+ _tmp0_ = i;
+ i = _tmp0_ + 1;
+ foo[_tmp0_] = 'b';
+ i = 0;
+ i = i + 1;
+ _tmp1_ = i;
+ foo[_tmp1_] = 'a';
+ i = 2;
+ _tmp2_ = i;
+ i = _tmp2_ + 1;
+ foo[_tmp2_] = 'r';
+ _vala_assert (i == 3, "i == 3");
+ _vala_assert (g_strcmp0 ((const gchar*) foo, "bar") == 0, "(string) foo == \"bar\"");
+}
+
+int
+main (int argc,
+ char ** argv)
+{
+ _vala_main ();
+ return 0;
+}
+