File: bug749576.c-expected

package info (click to toggle)
vala 0.56.18-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 57,468 kB
  • sloc: ansic: 581,293; sh: 5,334; makefile: 3,946; xml: 3,161; yacc: 1,219; lex: 374; javascript: 23
file content (153 lines) | stat: -rw-r--r-- 4,874 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/* parser_bug749576.c generated by valac, the Vala compiler
 * generated from parser_bug749576.vala, do not modify */

#include <stdlib.h>
#include <string.h>
#include <glib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (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);

static GRegex* _tmp_regex_0 = NULL;
static GRegex* _tmp_regex_1 = NULL;
static GRegex* _tmp_regex_2 = NULL;
static GRegex* _tmp_regex_3 = NULL;

static inline GRegex*
_thread_safe_regex_init (GRegex** re,
                         const gchar * pattern,
                         GRegexCompileFlags compile_flags)
{
	if (g_once_init_enter ((volatile gsize*) re)) {
		GRegex* val = g_regex_new (pattern, compile_flags, 0, NULL);
		g_once_init_leave ((volatile gsize*) re, (gsize) val);
	}
	return *re;
}

static void
_vala_main (void)
{
	const gchar* a = NULL;
	const gchar* b = NULL;
	const gchar* c = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp9_;
	GError* _inner_error0_ = NULL;
	a = "first line\nnext line";
	b = "first line\rnext line";
	c = "first \tline\r\nnext \tline";
	_tmp0_ = a;
	_vala_assert (g_regex_match (_thread_safe_regex_init (&_tmp_regex_0, "\\Rnext", 0), _tmp0_, 0, NULL), "/\\Rnext/.match (a)");
	_tmp1_ = b;
	_vala_assert (g_regex_match (_thread_safe_regex_init (&_tmp_regex_1, "\\Rnext", 0), _tmp1_, 0, NULL), "/\\Rnext/.match (b)");
	_tmp2_ = c;
	_vala_assert (g_regex_match (_thread_safe_regex_init (&_tmp_regex_2, "\\Rnext", 0), _tmp2_, 0, NULL), "/\\Rnext/.match (c)");
	{
		GRegex* r = NULL;
		GRegex* _tmp3_;
		GRegex* _tmp4_;
		const gchar* _tmp5_;
		GRegex* r2 = NULL;
		GRegex* _tmp6_;
		GRegex* _tmp7_;
		const gchar* _tmp8_;
		_tmp3_ = g_regex_new ("\\Rnext", 0, 0, &_inner_error0_);
		r = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp4_ = r;
		_tmp5_ = a;
		_vala_assert (g_regex_match (_tmp4_, _tmp5_, 0, NULL), "r.match (a)");
		_tmp6_ = g_regex_new ("\\Rnext", 0, 0, &_inner_error0_);
		r2 = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (r);
			goto __catch0_g_error;
		}
		_tmp7_ = r2;
		_tmp8_ = a;
		_vala_assert (g_regex_match (_tmp7_, _tmp8_, 0, NULL), "r2.match (a)");
		_g_regex_unref0 (r2);
		_g_regex_unref0 (r);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_tmp9_ = c;
	_vala_assert (g_regex_match (_thread_safe_regex_init (&_tmp_regex_3, "\\Nline", 0), _tmp9_, 0, NULL), "/\\Nline/.match (c)");
	{
		GRegex* r = NULL;
		GRegex* _tmp10_;
		GRegex* _tmp11_;
		const gchar* _tmp12_;
		GRegex* r2 = NULL;
		GRegex* _tmp13_;
		GRegex* _tmp14_;
		const gchar* _tmp15_;
		_tmp10_ = g_regex_new ("\\Nline", 0, 0, &_inner_error0_);
		r = _tmp10_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch1_g_error;
		}
		_tmp11_ = r;
		_tmp12_ = c;
		_vala_assert (g_regex_match (_tmp11_, _tmp12_, 0, NULL), "r.match (c)");
		_tmp13_ = g_regex_new ("\\Nline", 0, 0, &_inner_error0_);
		r2 = _tmp13_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (r);
			goto __catch1_g_error;
		}
		_tmp14_ = r2;
		_tmp15_ = c;
		_vala_assert (g_regex_match (_tmp14_, _tmp15_, 0, NULL), "r2.match (c)");
		_g_regex_unref0 (r2);
		_g_regex_unref0 (r);
	}
	goto __finally1;
	__catch1_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally1:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

int
main (int argc,
      char ** argv)
{
	_vala_main ();
	return 0;
}