On Wed, Aug 30, 2023 at 11:34:22AM -0400, Bruce Momjian wrote:
> Good news, I was able to prevent the bug by causing compiling of
> clauses.c to use -O2 by adding this to src/Makefile.custom:
>
> clauses.o : CFLAGS+=-O2
>
> Here is my submitted bug report:
>
> https://gcc.gnu.org/bug
On Wed, Aug 30, 2023 at 11:16:48AM -0400, Bruce Momjian wrote:
> On Tue, Aug 29, 2023 at 11:30:06PM -0400, Tom Lane wrote:
> > Bruce Momjian writes:
> > > On Tue, Aug 29, 2023 at 10:18:36AM -0400, Tom Lane wrote:
> > >> That seems like a pretty clear compiler bug, particularly since it just
> > >>
On Tue, Aug 29, 2023 at 11:30:06PM -0400, Tom Lane wrote:
> Bruce Momjian writes:
> > On Tue, Aug 29, 2023 at 10:18:36AM -0400, Tom Lane wrote:
> >> That seems like a pretty clear compiler bug, particularly since it just
> >> appears in this one version. Rather than contorting our code, I'd
> >>
Bruce Momjian writes:
> On Tue, Aug 29, 2023 at 10:18:36AM -0400, Tom Lane wrote:
>> That seems like a pretty clear compiler bug, particularly since it just
>> appears in this one version. Rather than contorting our code, I'd
>> suggest filing a gcc bug.
> I assume I have to create a test case t
Bruce Momjian writes:
> On Tue, Aug 29, 2023 at 10:26:27AM +0700, John Naylor wrote:
>> It looks like the former, since I can silence it on gcc 13 / -O1 by doing:
>> /* keep compiler quiet */
>> actual_arg_types[0] = InvalidOid;
> Agreed, that fixes it for me too. In fact, assigning to only elem
On Tue, Aug 29, 2023 at 10:26:27AM +0700, John Naylor wrote:
>
> On Tue, Aug 29, 2023 at 6:56 AM David Rowley wrote:
> >
> > I'm just not sure if it's unable to figure out if at least nargs
> > elements is set or if it won't be happy until all 100 elements are
> > set.
>
> It looks like the form
On Mon Aug 28, 2023 at 2:37 PM CDT, Bruce Momjian wrote:
I don't see a clean way of avoiding the warning except by initializing
the array, which seems wasteful.
For what it's worth, we recently committed a patch[0] that initialized
an array due to a similar warning being generated on Fedora 38
On Tue, Aug 29, 2023 at 6:56 AM David Rowley wrote:
>
> I'm just not sure if it's unable to figure out if at least nargs
> elements is set or if it won't be happy until all 100 elements are
> set.
It looks like the former, since I can silence it on gcc 13 / -O1 by doing:
/* keep compiler quiet *
On Mon, Aug 28, 2023 at 07:10:38PM -0400, Bruce Momjian wrote:
> On Tue, Aug 29, 2023 at 07:30:15AM +0900, Michael Paquier wrote:
> > On Mon, Aug 28, 2023 at 03:37:20PM -0400, Bruce Momjian wrote:
> > > I don't see a clean way of avoiding the warning except by initializing
> > > the array, which se
On Tue, Aug 29, 2023 at 11:55:48AM +1200, David Rowley wrote:
> On Tue, 29 Aug 2023 at 07:37, Bruce Momjian wrote:
> > nargs = 0;
> > foreach(lc, args)
> > {
> > actual_arg_types[nargs++] = exprType((Node *) lfirst(lc));
> > }
>
> Do
On Tue, 29 Aug 2023 at 07:37, Bruce Momjian wrote:
> nargs = 0;
> foreach(lc, args)
> {
> actual_arg_types[nargs++] = exprType((Node *) lfirst(lc));
> }
Does it still produce the warning if you form the above more like?
nargs = list
On Tue, Aug 29, 2023 at 07:30:15AM +0900, Michael Paquier wrote:
> On Mon, Aug 28, 2023 at 03:37:20PM -0400, Bruce Momjian wrote:
> > I don't see a clean way of avoiding the warning except by initializing
> > the array, which seems wasteful.
>
> Or just initialize the array with a {0}?
Uh, doesn'
On Mon, Aug 28, 2023 at 03:37:20PM -0400, Bruce Momjian wrote:
> I don't see a clean way of avoiding the warning except by initializing
> the array, which seems wasteful.
Or just initialize the array with a {0}?
--
Michael
signature.asc
Description: PGP signature
On Debian 12, gcc version 12.2.0 (Debian 12.2.0-14) generates a warning
on PG 13 to current, but only with -O1 optimization level, and not at
-O0/-O2/-O3:
clauses.c: In function ‘recheck_cast_function_args’:
clauses.c:4293:19: warning: ‘actual_arg_types’ may be used
uninitialized
14 matches
Mail list logo