Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue with type size assumptions in h5dumpgentest #4222

Merged
merged 1 commit into from
Mar 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions tools/test/h5dump/h5dumpgentest.c
Copy link
Collaborator Author

@jhendersonHDF jhendersonHDF Mar 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test uses the STD fixed-width datatypes for compound fields while assuming the sizes chosen match up with 16-bit short, 32-bit int and 64-bit long

Original file line number Diff line number Diff line change
Expand Up @@ -10689,19 +10689,19 @@ gent_compound_complex2(void)
{
/* Third-level nested compound */
typedef struct {
short deep_nested_short[10];
int deep_nested_int[10];
long deep_nested_long[10];
double deep_nested_double[10];
float deep_nested_float[10];
int16_t deep_nested_short[10];
int32_t deep_nested_int[10];
int64_t deep_nested_long[10];
double deep_nested_double[10];
float deep_nested_float[10];
} third_level_compound;

/* Second-level multiply-nested compounds */
typedef struct {
unsigned int multiple_nested_a[5];
int multiple_nested_b[5];
unsigned long multiple_nested_c[5];
long multiple_nested_d[5];
uint32_t multiple_nested_a[5];
int32_t multiple_nested_b[5];
uint64_t multiple_nested_c[5];
int64_t multiple_nested_d[5];
} further_nested;

typedef struct {
Expand All @@ -10727,8 +10727,8 @@ gent_compound_complex2(void)
/* Compound datatype with different member types */
typedef struct {
/* Arrays nested inside compound */
unsigned int a[4];
int b[6];
uint32_t a[4];
int32_t b[6];
float c[2][4];
nested_compound d; /* Compound inside compound */
multiple_nested_compound e; /* Compound inside compound with further nested compound */
Expand Down
Loading