Commit 2a744a74 authored by Lev Walkin's avatar Lev Walkin
Browse files

Behavior of -fnative-types made default; old behavior saved under -fwide-types

parent 11c9a8c7
???:
* Made -fskeletons-copy a default one; removed cmdline option.
* Updated asn1c-usage.pdf.
* Made -fskeletons-copy a default option; removed cmdline option.
* Made -fnative-types a default options; removed cmdline option.
Added -fwide-types for backwards compatibility.
0.9.24: 2013-Mar-16
......
......@@ -23,5 +23,5 @@ noinst_HEADERS = sys-common.h
dist_man1_MANS = asn1c.1 unber.1 enber.1
dist_check_SCRIPTS = check-xxber.sh check-parsing.sh
TESTS = $(check_SCRIPTS)
TESTS = $(dist_check_SCRIPTS)
CLEANFILES = .check-xxber.*.tmp .check-parsing.*.tmp
......@@ -36,7 +36,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = asn1c$(EXEEXT) unber$(EXEEXT) enber$(EXEEXT)
TESTS =
subdir = asn1c
DIST_COMMON = README $(dist_check_SCRIPTS) $(dist_man1_MANS) \
$(noinst_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in
......@@ -282,6 +281,7 @@ asn1c_LDADD = \
noinst_HEADERS = sys-common.h
dist_man1_MANS = asn1c.1 unber.1 enber.1
dist_check_SCRIPTS = check-xxber.sh check-parsing.sh
TESTS = $(dist_check_SCRIPTS)
CLEANFILES = .check-xxber.*.tmp .check-parsing.*.tmp
all: all-recursive
......
......@@ -26,7 +26,7 @@ and other encoding rules.
.br
\fB\-fbless-SIZE \-fcompound-names \-findirect-choice
.BI "\-fknown-extern-type="<name>
\fB\-fnative-types \-fno-constraints \-fno-include-deps \-funnamed-unions
\fB\-fno-constraints \-fno-include-deps \-funnamed-unions \-fwide-types
.TP
\fICodecs Generation Options\fR
.br
......@@ -98,10 +98,6 @@ to prevent circular references.
Pretend the specified type is known. The compiler will assume the target
language source files for the given type have been provided manually.
.TP
.B \-fnative-types
Use the native machine's data types (int, double) whenever possible,
instead of the compound INTEGER_t, ENUMERATED_t and REAL_t types.
.TP
.B \-fno-constraints
Do not generate ASN.1 subtype constraint checking code. This may make a shorter executable.
.TP
......@@ -111,6 +107,10 @@ Helps prevent namespace collisions.
.TP
.B \-funnamed-unions
Enable unnamed unions in the definitions of target language's structures.
.TP
.B \-fwide-types
Use the unbounded size data types (INTEGER_t, ENUMERATED_t, REAL_t) by default,
instead of the native machine's data types (long, double).
.SH CODECS GENERATION OPTIONS
.TP
.B \-gen-PER
......
......@@ -92,7 +92,10 @@ main(int ac, char **av) {
ret = asn1f_make_known_external_type(known_type);
assert(ret == 0 || errno == EEXIST);
} else if(strcmp(optarg, "native-types") == 0) {
asn1_compiler_flags |= A1C_USE_NATIVE_TYPES;
fprintf(stderr, "-f%s: Deprecated option\n", optarg);
asn1_compiler_flags &= ~A1C_USE_WIDE_TYPES;
} else if(strcmp(optarg, "wide-types") == 0) {
asn1_compiler_flags |= A1C_USE_WIDE_TYPES;
} else if(strcmp(optarg, "no-constraints") == 0) {
asn1_compiler_flags |= A1C_NO_CONSTRAINTS;
} else if(strcmp(optarg, "no-include-deps") == 0) {
......@@ -103,6 +106,7 @@ main(int ac, char **av) {
asn1_compiler_flags |= A1C_UNNAMED_UNIONS;
} else if(strcmp(optarg, "skeletons-copy") == 0) {
fprintf(stderr, "-f%s: Deprecated option\n", optarg);
asn1_compiler_flags &= ~A1C_LINK_SKELETONS;
} else if(strcmp(optarg, "link-skeletons") == 0) {
asn1_compiler_flags |= A1C_LINK_SKELETONS;
} else {
......@@ -460,10 +464,10 @@ usage(const char *av0) {
" -findirect-choice Compile members of CHOICE as indirect pointers\n"
" -fincludes-quoted Generate #includes in \"double\" instead of <angle> quotes\n"
" -fknown-extern-type=<name> Pretend the specified type is known\n"
" -fnative-types Use \"long\" instead of INTEGER_t whenever possible, etc.\n"
" -fno-constraints Do not generate constraint checking code\n"
" -fno-include-deps Do not generate courtesy #includes for dependencies\n"
" -funnamed-unions Enable unnamed unions in structures\n"
" -fwide-types Use INTEGER_t instead of \"long\" by default, etc.\n"
"\n"
" -gen-PER Generate PER support code\n"
......
......@@ -7,52 +7,136 @@
#include <T.h>
uint8_t buf0[] = {
32 | ((2 << 6) + 1), /* [1], constructed */
18,
/* string [0] IMPLICIT UTF8String, */
(2 << 6), /* [0] */
16, /* L */
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
};
uint8_t buf0_reconstr[] = {
32 | ((2 << 6) + 1), /* [1], constructed */
18,
/* string [0] IMPLICIT UTF8String, */
(2 << 6), /* [0] */
16, /* L */
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
};
uint8_t buf1[] = {
32 | (2 << 6), /* [0], constructed */
25, /* L */
0x80 | 1, /* L */
134,
/* string [0] IMPLICIT UTF8String, */
(2 << 6), /* [0] */
16, /* L */
0x80 | 1, /* L */
128,
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
/* beta [2] IMPLICIT INTEGER OPTIONAL */
(2 << 6) + 2, /* [2] */
5, /* L */
0,
75,
0x4b,
75,
/* alpha [1] IMPLICIT INTEGER OPTIONAL */
(2 << 6) + 1, /* [1] */
1, /* L */
75,
};
uint8_t buf1_reconstr[] = {
32 | (2 << 6), /* [0], constructed */
24, /* L */
32 | (2 << 6), /* [0], constructed */
0x80 | 1, /* L */
134,
/* string [0] IMPLICIT UTF8String, */
(2 << 6), /* [0] */
0x80 | 1, /* L */
128,
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
/* alpha [1] IMPLICIT INTEGER OPTIONAL */
(2 << 6) + 1, /* [1] */
1, /* L */
75,
};
uint8_t buf2[] = {
32 | ((2 << 6) + 1), /* [1], constructed */
0x80 | 1, /* L */
134,
/* string [0] IMPLICIT UTF8String, */
(2 << 6), /* [0] */
16, /* L */
0x80 | 1, /* L */
128,
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
/* beta [2] IMPLICIT INTEGER OPTIONAL */
(2 << 6) + 2, /* [2] */
4, /* L */
75,
1, /* L */
75,
};
uint8_t buf2_reconstr[] = {
32 | ((2 << 6) + 1), /* [1], constructed */
0x80 | 1, /* L */
134,
/* string [0] IMPLICIT UTF8String, */
(2 << 6), /* [0] */
0x80 | 1, /* L */
128,
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
/* beta [2] IMPLICIT INTEGER OPTIONAL */
(2 << 6) + 2, /* [2] */
1, /* L */
75,
0x4b,
};
static void
check(T_t *tp, uint8_t *buf, int size, size_t consumed) {
asn_dec_rval_t rval;
int ret;
tp = memset(tp, 0, sizeof(*tp));
fprintf(stderr, "Buf %p (%d)\n", buf, size);
fprintf(stderr, "Buf %p (%d)\n", (int)buf, (int)size);
rval = ber_decode(0, &asn_DEF_T, (void **)&tp, buf, size);
fprintf(stderr, "Returned code %d, consumed %d\n",
(int)rval.code, (int)rval.consumed);
......@@ -60,19 +144,28 @@ check(T_t *tp, uint8_t *buf, int size, size_t consumed) {
assert(rval.code == RC_OK);
assert(rval.consumed == consumed);
assert(tp->choice.seq.string.size == 16);
assert(strcmp(tp->choice.seq.string.buf, "zzzzzzzzzzzzzzzz") == 0);
assert(tp->choice.seq.alpha == NULL);
assert(tp->choice.seq.beta);
assert(*tp->choice.seq.beta == 0x4b4b4b4b);
fprintf(stderr, "=== asn_fprint() ===\n");
ret = asn_fprint(stderr, &asn_DEF_T, tp);
assert(ret == 0);
fprintf(stderr, "=== xer_fprint() ===\n");
ret = xer_fprint(stderr, &asn_DEF_T, tp);
fprintf(stderr, "=== END ===\n");
assert(ret == 0);
/*
assert(tp->string.size == 128);
assert(strncmp(tp->string.buf, "zz") == 0);
assert(strcmp(tp->b.choice.b1.buf, "z") == 0
&& strcmp(tp->b.choice.b2.buf, "z") == 0);
*/
}
size_t buf_pos;
size_t buf_size;
uint8_t *buf;
uint8_t *buffer;
static int
buf_fill(const void *buffer, size_t size, void *app_key) {
buf_fill(const void *bufp, size_t size, void *app_key) {
(void)app_key; /* Unused argument */
......@@ -82,7 +175,7 @@ buf_fill(const void *buffer, size_t size, void *app_key) {
return -1;
}
memcpy(buf + buf_pos, buffer, size);
memcpy(buffer + buf_pos, bufp, size);
buf_pos += size;
fprintf(stderr, " written %d (%d)\n", (int)size, (int)buf_pos);
......@@ -95,7 +188,7 @@ compare(T_t *tp, uint8_t *cmp_buf, int cmp_buf_size) {
int i;
buf_size = cmp_buf_size + 100;
buf = alloca(buf_size);
buffer = alloca(buf_size);
buf_pos = 0;
/*
......@@ -104,87 +197,87 @@ compare(T_t *tp, uint8_t *cmp_buf, int cmp_buf_size) {
erval = der_encode(&asn_DEF_T, tp, buf_fill, 0);
assert(erval.encoded != -1);
if(erval.encoded != cmp_buf_size) {
printf("%d != %d\n", erval.encoded, cmp_buf_size);
printf("%d != %d\n", (int)erval.encoded, (int)cmp_buf_size);
}
assert(erval.encoded == cmp_buf_size);
for(i = 0; i < cmp_buf_size; i++) {
if(buf[i] != cmp_buf[i]) {
if(buffer[i] != cmp_buf[i]) {
fprintf(stderr, "Recreated buffer content mismatch:\n");
fprintf(stderr, "Byte %d, %x != %x (%d != %d)\n",
i,
buf[i], cmp_buf[i],
buf[i], cmp_buf[i]
buffer[i], cmp_buf[i],
buffer[i], cmp_buf[i]
);
}
assert(buf[i] == cmp_buf[i]);
assert(buffer[i] == cmp_buf[i]);
}
}
static void
partial_read(uint8_t *buf_0, size_t size) {
partial_read(uint8_t *buf, size_t size) {
T_t t, *tp;
asn_dec_rval_t rval;
size_t i1, i2;
uint8_t *buf_1 = alloca(size);
uint8_t *buf_2 = alloca(size);
uint8_t *buf_3 = alloca(size);
uint8_t *buf1 = alloca(size);
uint8_t *buf2 = alloca(size);
uint8_t *buf3 = alloca(size);
fprintf(stderr, "\nPartial read sequence...\n");
/*
* Divide the space (size) into three blocks in various combinations:
* |<----->i1<----->i2<----->|
* ^ buf_0 ^ buf_0+size
* ^ buf ^ buf+size
* Try to read block by block.
*/
for(i1 = 0; i1 < size; i1++) {
for(i2 = i1; i2 < size; i2++) {
uint8_t *chunk1 = buf_0;
uint8_t *chunk1 = buf;
size_t size1 = i1;
uint8_t *chunk2 = buf_0 + size1;
uint8_t *chunk2 = buf + size1;
size_t size2 = i2 - i1;
uint8_t *chunk3 = buf_0 + size1 + size2;
uint8_t *chunk3 = buf + size1 + size2;
size_t size3 = size - size1 - size2;
fprintf(stderr, "\n%d:{%d, %d, %d}...\n",
(int)size, (int)size1, (int)size2, (int)size3);
memset(buf_1, 0, size);
memset(buf_2, 0, size);
memset(buf_3, 0, size);
memcpy(buf_1, chunk1, size1);
memcpy(buf_2, chunk2, size2);
memcpy(buf_3, chunk3, size3);
memset(buf1, 0, size);
memset(buf2, 0, size);
memset(buf3, 0, size);
memcpy(buf1, chunk1, size1);
memcpy(buf2, chunk2, size2);
memcpy(buf3, chunk3, size3);
tp = memset(&t, 0, sizeof(t));
fprintf(stderr, "=> Chunk 1 (%d):\n", (int)size1);
rval = ber_decode(0, &asn_DEF_T, (void **)&tp,
buf_1, size1);
buf1, size1);
assert(rval.code == RC_WMORE);
assert(rval.consumed <= size1);
if(rval.consumed < size1) {
int leftover = size1 - rval.consumed;
memcpy(buf_2, buf_1 + rval.consumed, leftover);
memcpy(buf_2 + leftover, chunk2, size2);
memcpy(buf2, buf1 + rval.consumed, leftover);
memcpy(buf2 + leftover, chunk2, size2);
size2 += leftover;
}
fprintf(stderr, "=> Chunk 2 (%d):\n", (int)size2);
rval = ber_decode(0, &asn_DEF_T, (void **)&tp,
buf_2, size2);
buf2, size2);
assert(rval.code == RC_WMORE);
assert(rval.consumed <= size2);
if(rval.consumed < size2) {
int leftover = size2 - rval.consumed;
memcpy(buf_3, buf_2 + rval.consumed, leftover);
memcpy(buf_3 + leftover, chunk3, size3);
memcpy(buf3, buf2 + rval.consumed, leftover);
memcpy(buf3 + leftover, chunk3, size3);
size3 += leftover;
}
fprintf(stderr, "=> Chunk 3 (%d):\n", (int)size3);
rval = ber_decode(0, &asn_DEF_T, (void **)&tp,
buf_3, size3);
buf3, size3);
assert(rval.code == RC_OK);
assert(rval.consumed == size3);
......@@ -194,26 +287,36 @@ partial_read(uint8_t *buf_0, size_t size) {
}
int
main(int ac, char **av) {
main() {
T_t t;
(void)ac; /* Unused argument */
(void)av; /* Unused argument */
/* Check exact buf0 */
check(&t, buf0, sizeof(buf0), sizeof(buf0));
compare(&t, buf0_reconstr, sizeof(buf0_reconstr));
asn_DEF_T.free_struct(&asn_DEF_T, &t, 1);
/* Check exact buf1 */
check(&t, buf1, sizeof(buf1), sizeof(buf1));
compare(&t, buf1_reconstr, sizeof(buf1_reconstr));
asn_fprint(stderr, &asn_DEF_T, &t);
asn_DEF_T.free_struct(&asn_DEF_T, &t, 1);
/* Check slightly more than buf1 */
check(&t, buf1, sizeof(buf1) + 10, sizeof(buf1));
compare(&t, buf1_reconstr, sizeof(buf1_reconstr));
asn_fprint(stderr, &asn_DEF_T, &t);
asn_DEF_T.free_struct(&asn_DEF_T, &t, 1);
/* Check exact buf2 */
check(&t, buf2, sizeof(buf2), sizeof(buf2));
compare(&t, buf2_reconstr, sizeof(buf2_reconstr));
asn_DEF_T.free_struct(&asn_DEF_T, &t, 1);
/* Check slightly more than buf2 */
check(&t, buf2, sizeof(buf2) + 10, sizeof(buf2));
compare(&t, buf2_reconstr, sizeof(buf2_reconstr));
asn_DEF_T.free_struct(&asn_DEF_T, &t, 1);
/* Split the buffer in parts and check decoder restartability */
partial_read(buf1, sizeof(buf1));
partial_read(buf0, sizeof(buf0));
return 0;
}
......@@ -7,136 +7,52 @@
#include <T.h>
uint8_t buf0[] = {
32 | ((2 << 6) + 1), /* [1], constructed */
18,
/* string [0] IMPLICIT UTF8String, */
(2 << 6), /* [0] */
16, /* L */
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
};
uint8_t buf0_reconstr[] = {
32 | ((2 << 6) + 1), /* [1], constructed */
18,
/* string [0] IMPLICIT UTF8String, */
(2 << 6), /* [0] */
16, /* L */
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
};
uint8_t buf1[] = {
32 | (2 << 6), /* [0], constructed */
0x80 | 1, /* L */
134,
25, /* L */
/* string [0] IMPLICIT UTF8String, */
(2 << 6), /* [0] */
0x80 | 1, /* L */
128,
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
16, /* L */
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
/* alpha [1] IMPLICIT INTEGER OPTIONAL */
(2 << 6) + 1, /* [1] */
1, /* L */
/* beta [2] IMPLICIT INTEGER OPTIONAL */
(2 << 6) + 2, /* [2] */
5, /* L */
0,
75,
0x4b,
75,
};
uint8_t buf1_reconstr[] = {
32 | (2 << 6), /* [0], constructed */
0x80 | 1, /* L */
134,
/* string [0] IMPLICIT UTF8String, */
(2 << 6), /* [0] */
0x80 | 1, /* L */
128,
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
/* alpha [1] IMPLICIT INTEGER OPTIONAL */
(2 << 6) + 1, /* [1] */
1, /* L */
75,
};
uint8_t buf2[] = {
32 | ((2 << 6) + 1), /* [1], constructed */
0x80 | 1, /* L */
134,
uint8_t buf1_reconstr[] = {
32 | (2 << 6), /* [0], constructed */
24, /* L */
/* string [0] IMPLICIT UTF8String, */
(2 << 6), /* [0] */
0x80 | 1, /* L */
128,
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
16, /* L */
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
/* beta [2] IMPLICIT INTEGER OPTIONAL */
(2 << 6) + 2, /* [2] */
1, /* L */
4, /* L */
75,