From: Tobias Burnus Date: Mon, 28 Sep 2020 21:10:31 +0000 (+0200) Subject: libgfortran/m4/unpack.m4: Silence -Wmaybe-uninitialized X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=69c56ce673d1e1d4508e82053a32011f807c6088;p=gcc.git libgfortran/m4/unpack.m4: Silence -Wmaybe-uninitialized libgfortran/ChangeLog: * m4/unpack.m4 (unpack0_'rtype_code`, unpack1_'rtype_code`): Move 'rstride[0]' initialization outside conditional branch to silence -Wmaybe-uninitialized. * generated/unpack_c10.c: Regenerate. * generated/unpack_c16.c: Regenerate. * generated/unpack_c4.c: Regenerate. * generated/unpack_c8.c: Regenerate. * generated/unpack_i1.c: Regenerate. * generated/unpack_i16.c: Regenerate. * generated/unpack_i2.c: Regenerate. * generated/unpack_i4.c: Regenerate. * generated/unpack_i8.c: Regenerate. * generated/unpack_r10.c: Regenerate. * generated/unpack_r16.c: Regenerate. * generated/unpack_r4.c: Regenerate. * generated/unpack_r8.c: Regenerate. --- diff --git a/libgfortran/generated/unpack_c10.c b/libgfortran/generated/unpack_c10.c index e3b3c29e9da..12110df8af0 100644 --- a/libgfortran/generated/unpack_c10.c +++ b/libgfortran/generated/unpack_c10.c @@ -79,6 +79,8 @@ unpack0_c10 (gfc_array_c10 *ret, const gfc_array_c10 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_c10 (gfc_array_c10 *ret, const gfc_array_c10 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_c10 (gfc_array_c10 *ret, const gfc_array_c10 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_c10 (gfc_array_c10 *ret, const gfc_array_c10 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/generated/unpack_c16.c b/libgfortran/generated/unpack_c16.c index 0c99509cfda..c684156f297 100644 --- a/libgfortran/generated/unpack_c16.c +++ b/libgfortran/generated/unpack_c16.c @@ -79,6 +79,8 @@ unpack0_c16 (gfc_array_c16 *ret, const gfc_array_c16 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_c16 (gfc_array_c16 *ret, const gfc_array_c16 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_c16 (gfc_array_c16 *ret, const gfc_array_c16 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_c16 (gfc_array_c16 *ret, const gfc_array_c16 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/generated/unpack_c4.c b/libgfortran/generated/unpack_c4.c index 15c20c57334..374b3fe0c8c 100644 --- a/libgfortran/generated/unpack_c4.c +++ b/libgfortran/generated/unpack_c4.c @@ -79,6 +79,8 @@ unpack0_c4 (gfc_array_c4 *ret, const gfc_array_c4 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_c4 (gfc_array_c4 *ret, const gfc_array_c4 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_c4 (gfc_array_c4 *ret, const gfc_array_c4 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_c4 (gfc_array_c4 *ret, const gfc_array_c4 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/generated/unpack_c8.c b/libgfortran/generated/unpack_c8.c index b85fcb98abe..110cb4f3ee0 100644 --- a/libgfortran/generated/unpack_c8.c +++ b/libgfortran/generated/unpack_c8.c @@ -79,6 +79,8 @@ unpack0_c8 (gfc_array_c8 *ret, const gfc_array_c8 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_c8 (gfc_array_c8 *ret, const gfc_array_c8 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_c8 (gfc_array_c8 *ret, const gfc_array_c8 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_c8 (gfc_array_c8 *ret, const gfc_array_c8 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/generated/unpack_i1.c b/libgfortran/generated/unpack_i1.c index 1bea990e80e..96237a169b2 100644 --- a/libgfortran/generated/unpack_i1.c +++ b/libgfortran/generated/unpack_i1.c @@ -79,6 +79,8 @@ unpack0_i1 (gfc_array_i1 *ret, const gfc_array_i1 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_i1 (gfc_array_i1 *ret, const gfc_array_i1 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_i1 (gfc_array_i1 *ret, const gfc_array_i1 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_i1 (gfc_array_i1 *ret, const gfc_array_i1 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/generated/unpack_i16.c b/libgfortran/generated/unpack_i16.c index fa69d8ef08c..f58be9572d9 100644 --- a/libgfortran/generated/unpack_i16.c +++ b/libgfortran/generated/unpack_i16.c @@ -79,6 +79,8 @@ unpack0_i16 (gfc_array_i16 *ret, const gfc_array_i16 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_i16 (gfc_array_i16 *ret, const gfc_array_i16 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_i16 (gfc_array_i16 *ret, const gfc_array_i16 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_i16 (gfc_array_i16 *ret, const gfc_array_i16 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/generated/unpack_i2.c b/libgfortran/generated/unpack_i2.c index 59baea51bd6..0dab104c9db 100644 --- a/libgfortran/generated/unpack_i2.c +++ b/libgfortran/generated/unpack_i2.c @@ -79,6 +79,8 @@ unpack0_i2 (gfc_array_i2 *ret, const gfc_array_i2 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_i2 (gfc_array_i2 *ret, const gfc_array_i2 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_i2 (gfc_array_i2 *ret, const gfc_array_i2 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_i2 (gfc_array_i2 *ret, const gfc_array_i2 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/generated/unpack_i4.c b/libgfortran/generated/unpack_i4.c index 4dc7482f6ca..b32c92a5d67 100644 --- a/libgfortran/generated/unpack_i4.c +++ b/libgfortran/generated/unpack_i4.c @@ -79,6 +79,8 @@ unpack0_i4 (gfc_array_i4 *ret, const gfc_array_i4 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_i4 (gfc_array_i4 *ret, const gfc_array_i4 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_i4 (gfc_array_i4 *ret, const gfc_array_i4 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_i4 (gfc_array_i4 *ret, const gfc_array_i4 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/generated/unpack_i8.c b/libgfortran/generated/unpack_i8.c index 40a929854e7..25a928ca13c 100644 --- a/libgfortran/generated/unpack_i8.c +++ b/libgfortran/generated/unpack_i8.c @@ -79,6 +79,8 @@ unpack0_i8 (gfc_array_i8 *ret, const gfc_array_i8 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_i8 (gfc_array_i8 *ret, const gfc_array_i8 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_i8 (gfc_array_i8 *ret, const gfc_array_i8 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_i8 (gfc_array_i8 *ret, const gfc_array_i8 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/generated/unpack_r10.c b/libgfortran/generated/unpack_r10.c index 7981754ca35..4044ec3f897 100644 --- a/libgfortran/generated/unpack_r10.c +++ b/libgfortran/generated/unpack_r10.c @@ -79,6 +79,8 @@ unpack0_r10 (gfc_array_r10 *ret, const gfc_array_r10 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_r10 (gfc_array_r10 *ret, const gfc_array_r10 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_r10 (gfc_array_r10 *ret, const gfc_array_r10 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_r10 (gfc_array_r10 *ret, const gfc_array_r10 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/generated/unpack_r16.c b/libgfortran/generated/unpack_r16.c index ac5738ff07d..beeaa4e41e8 100644 --- a/libgfortran/generated/unpack_r16.c +++ b/libgfortran/generated/unpack_r16.c @@ -79,6 +79,8 @@ unpack0_r16 (gfc_array_r16 *ret, const gfc_array_r16 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_r16 (gfc_array_r16 *ret, const gfc_array_r16 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_r16 (gfc_array_r16 *ret, const gfc_array_r16 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_r16 (gfc_array_r16 *ret, const gfc_array_r16 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/generated/unpack_r4.c b/libgfortran/generated/unpack_r4.c index b149b5183ab..283dd848f52 100644 --- a/libgfortran/generated/unpack_r4.c +++ b/libgfortran/generated/unpack_r4.c @@ -79,6 +79,8 @@ unpack0_r4 (gfc_array_r4 *ret, const gfc_array_r4 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_r4 (gfc_array_r4 *ret, const gfc_array_r4 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_r4 (gfc_array_r4 *ret, const gfc_array_r4 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_r4 (gfc_array_r4 *ret, const gfc_array_r4 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/generated/unpack_r8.c b/libgfortran/generated/unpack_r8.c index d8db8e0ac14..08882995313 100644 --- a/libgfortran/generated/unpack_r8.c +++ b/libgfortran/generated/unpack_r8.c @@ -79,6 +79,8 @@ unpack0_r8 (gfc_array_r8 *ret, const gfc_array_r8 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -102,8 +104,6 @@ unpack0_r8 (gfc_array_r8 *ret, const gfc_array_r8 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -225,6 +225,8 @@ unpack1_r8 (gfc_array_r8 *ret, const gfc_array_r8 *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -249,8 +251,6 @@ unpack1_r8 (gfc_array_r8 *ret, const gfc_array_r8 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; diff --git a/libgfortran/m4/unpack.m4 b/libgfortran/m4/unpack.m4 index da7a5ce0443..ebc469a84f8 100644 --- a/libgfortran/m4/unpack.m4 +++ b/libgfortran/m4/unpack.m4 @@ -80,6 +80,8 @@ unpack0_'rtype_code` ('rtype` *ret, const 'rtype` *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -103,8 +105,6 @@ unpack0_'rtype_code` ('rtype` *ret, const 'rtype` *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -226,6 +226,8 @@ unpack1_'rtype_code` ('rtype` *ret, const 'rtype` *vector, else runtime_error ("Funny sized logical array"); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; if (ret->base_addr == NULL) { /* The front end has signalled that we need to populate the @@ -250,8 +252,6 @@ unpack1_'rtype_code` ('rtype` *ret, const 'rtype` *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); - /* Initialize to avoid -Wmaybe-uninitialized complaints. */ - rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0;