/* pointers_bug590641.c generated by valac, the Vala compiler * generated from pointers_bug590641.vala, do not modify */ #include #include #include #if !defined(VALA_EXTERN) #if defined(_MSC_VER) #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); VALA_EXTERN void foo (gchar** s); static void _vala_main (void); const gchar* FOO[2] = {"foo", "bar"}; void foo (gchar** s) { const gchar* _tmp0_; _tmp0_ = ((gchar**) s)[0]; _vala_assert (g_strcmp0 (_tmp0_, "foo") == 0, "((string[]) s)[0] == \"foo\""); } static void _vala_main (void) { guint i = 0U; gint* p0 = NULL; guint u0 = 0U; gint* p1 = NULL; guint u1 = 0U; gchar** p2 = NULL; gchar* s0 = NULL; gchar* _tmp0_; gchar* _tmp1_; gchar* s1 = NULL; gchar* _tmp2_; i = (guint) 42; p0 = (gint*) (&i); u0 = (guint) (*p0); _vala_assert (u0 == i, "u0 == i"); p1 = (gint*) (&i); u1 = (guint) (*p1); _vala_assert (u1 == i, "u1 == i"); p2 = (gchar**) FOO; foo ((gchar**) FOO); foo (p2); _tmp0_ = p2[0]; _tmp1_ = g_strdup ((const gchar*) _tmp0_); s0 = _tmp1_; _vala_assert (g_strcmp0 (s0, "foo") == 0, "s0 == \"foo\""); _tmp2_ = g_strdup ((const gchar*) (*(p2 + 1))); s1 = _tmp2_; _vala_assert (g_strcmp0 (s1, "bar") == 0, "s1 == \"bar\""); _g_free0 (s1); _g_free0 (s0); } int main (int argc, char ** argv) { _vala_main (); return 0; }