/* arrays_constant_element_access.c generated by valac, the Vala compiler * generated from arrays_constant_element_access.vala, do not modify */ #include #include #include #if !defined(VALA_EXTERN) #if defined(_WIN32) || defined(__CYGWIN__) #define VALA_EXTERN __declspec(dllexport) extern #elif __GNUC__ >= 4 #define VALA_EXTERN __attribute__((visibility("default"))) extern #else #define VALA_EXTERN extern #endif #endif #define _g_free0(var) (var = (g_free (var), NULL)) #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); const gchar* FOO[3][3] = {{"00", "01", "02"}, {"10", "11", "12"}, {"20", "21", "22"}}; static void _vala_main (void) { static const gchar* BAR[3][3] = {{"00", "01", "02"}, {"10", "11", "12"}, {"20", "21", "22"}}; const gchar* _tmp24_; gchar* _tmp25_; gchar* _tmp26_; const gchar* _tmp27_; gchar* _tmp28_; gchar* _tmp29_; const gchar* _tmp30_; gchar* _tmp31_; gchar* _tmp32_; const gchar* _tmp33_; gchar* _tmp34_; gchar* _tmp35_; const gchar* _tmp36_; gchar* _tmp37_; gchar* _tmp38_; const gchar* _tmp39_; gchar* _tmp40_; gchar* _tmp41_; { gint i = 0; i = 0; { gboolean _tmp0_ = FALSE; _tmp0_ = TRUE; while (TRUE) { gint _tmp2_; const gchar* _tmp3_; gchar* _tmp4_; gchar* _tmp5_; const gchar* _tmp6_; gchar* _tmp7_; gchar* _tmp8_; const gchar* _tmp9_; gchar* _tmp10_; gchar* _tmp11_; if (!_tmp0_) { gint _tmp1_; _tmp1_ = i; i = _tmp1_ + 1; } _tmp0_ = FALSE; _tmp2_ = G_N_ELEMENTS (FOO); if (!(i < _tmp2_)) { break; } _tmp3_ = FOO[i][0]; _tmp4_ = g_strdup_printf ("%d%d", i, 0); _tmp5_ = _tmp4_; _vala_assert (g_strcmp0 (_tmp3_, _tmp5_) == 0, "FOO[i,0] == \"%d%d\".printf (i, 0)"); _g_free0 (_tmp5_); _tmp6_ = FOO[i][1]; _tmp7_ = g_strdup_printf ("%d%d", i, 1); _tmp8_ = _tmp7_; _vala_assert (g_strcmp0 (_tmp6_, _tmp8_) == 0, "FOO[i,1] == \"%d%d\".printf (i, 1)"); _g_free0 (_tmp8_); _tmp9_ = FOO[i][2]; _tmp10_ = g_strdup_printf ("%d%d", i, 2); _tmp11_ = _tmp10_; _vala_assert (g_strcmp0 (_tmp9_, _tmp11_) == 0, "FOO[i,2] == \"%d%d\".printf (i, 2)"); _g_free0 (_tmp11_); } } } { gint i = 0; i = 0; { gboolean _tmp12_ = FALSE; _tmp12_ = TRUE; while (TRUE) { gint _tmp14_; const gchar* _tmp15_; gchar* _tmp16_; gchar* _tmp17_; const gchar* _tmp18_; gchar* _tmp19_; gchar* _tmp20_; const gchar* _tmp21_; gchar* _tmp22_; gchar* _tmp23_; if (!_tmp12_) { gint _tmp13_; _tmp13_ = i; i = _tmp13_ + 1; } _tmp12_ = FALSE; _tmp14_ = G_N_ELEMENTS (BAR); if (!(i < _tmp14_)) { break; } _tmp15_ = BAR[i][0]; _tmp16_ = g_strdup_printf ("%d%d", i, 0); _tmp17_ = _tmp16_; _vala_assert (g_strcmp0 (_tmp15_, _tmp17_) == 0, "BAR[i,0] == \"%d%d\".printf (i, 0)"); _g_free0 (_tmp17_); _tmp18_ = BAR[i][1]; _tmp19_ = g_strdup_printf ("%d%d", i, 1); _tmp20_ = _tmp19_; _vala_assert (g_strcmp0 (_tmp18_, _tmp20_) == 0, "BAR[i,1] == \"%d%d\".printf (i, 1)"); _g_free0 (_tmp20_); _tmp21_ = BAR[i][2]; _tmp22_ = g_strdup_printf ("%d%d", i, 2); _tmp23_ = _tmp22_; _vala_assert (g_strcmp0 (_tmp21_, _tmp23_) == 0, "BAR[i,2] == \"%d%d\".printf (i, 2)"); _g_free0 (_tmp23_); } } } _tmp24_ = FOO[0][0]; _tmp25_ = g_strdup_printf ("%d%d", 0, 0); _tmp26_ = _tmp25_; _vala_assert (g_strcmp0 (_tmp24_, _tmp26_) == 0, "FOO[0,0] == \"%d%d\".printf (0, 0)"); _g_free0 (_tmp26_); _tmp27_ = FOO[1][1]; _tmp28_ = g_strdup_printf ("%d%d", 1, 1); _tmp29_ = _tmp28_; _vala_assert (g_strcmp0 (_tmp27_, _tmp29_) == 0, "FOO[1,1] == \"%d%d\".printf (1, 1)"); _g_free0 (_tmp29_); _tmp30_ = FOO[2][2]; _tmp31_ = g_strdup_printf ("%d%d", 2, 2); _tmp32_ = _tmp31_; _vala_assert (g_strcmp0 (_tmp30_, _tmp32_) == 0, "FOO[2,2] == \"%d%d\".printf (2, 2)"); _g_free0 (_tmp32_); _tmp33_ = BAR[0][0]; _tmp34_ = g_strdup_printf ("%d%d", 0, 0); _tmp35_ = _tmp34_; _vala_assert (g_strcmp0 (_tmp33_, _tmp35_) == 0, "BAR[0,0] == \"%d%d\".printf (0, 0)"); _g_free0 (_tmp35_); _tmp36_ = BAR[1][1]; _tmp37_ = g_strdup_printf ("%d%d", 1, 1); _tmp38_ = _tmp37_; _vala_assert (g_strcmp0 (_tmp36_, _tmp38_) == 0, "BAR[1,1] == \"%d%d\".printf (1, 1)"); _g_free0 (_tmp38_); _tmp39_ = BAR[2][2]; _tmp40_ = g_strdup_printf ("%d%d", 2, 2); _tmp41_ = _tmp40_; _vala_assert (g_strcmp0 (_tmp39_, _tmp41_) == 0, "BAR[2,2] == \"%d%d\".printf (2, 2)"); _g_free0 (_tmp41_); } int main (int argc, char ** argv) { _vala_main (); return 0; }