From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id CB7353858D20 for ; Wed, 23 Feb 2022 07:39:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CB7353858D20 Received: by mail-pj1-x1033.google.com with SMTP id m22so1948067pja.0 for ; Tue, 22 Feb 2022 23:39:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uy+T+uBrp14kOGBmH1dZo0+lkrxQSvwdYKcFwhuT7bM=; b=KsXgKNuHp+k7TBbtrTwYG+coT09y8fNHRQvL4ylZ2yEjnKWnpSlntl4brY9ehHx2Y2 Idlj/cJMKDRph8Q/iCbpU7qMKiwIJ+ESPsqdPOpzz3sYB8gY4cHCC8d+1r0Rz+HAwzmX MxzAYNq6+BKCkPYFiR0LqDd+0l6wqGAuIgZP9IGUnb5mF+cizn5xH1YBOzNSiJEfduj8 vCIu0RpIKmCekmj59YXOPY1PZwxRORocLVemvHtyqf2ZKQTpnzcTVXWz3Z6/T0STV6ll ZIRjHwyHX6T9T/NEL3+36E01KTnfIP8Kz5ToasUdxGlcVyqCziU4IeOT/chYOIo53VgZ 4roA== X-Gm-Message-State: AOAM530rAN7T69dLFU30IJabAsK5jJtmprXIO6jq+97KqyM/zTHz691S tJEYZz2DPHNYWrUgx0ILG9GQNQyXOqmXR0/U754= X-Google-Smtp-Source: ABdhPJyKu8yn4esZkW1MV7fssqP7xpV7S/sCrctGZwq+yojaPVIBXZrbv6hisurXgFEtReD2JwcssY8+ftf+LmLjEsc= X-Received: by 2002:a17:902:6b0c:b0:14f:3a39:ad3d with SMTP id o12-20020a1709026b0c00b0014f3a39ad3dmr26179098plk.113.1645601987890; Tue, 22 Feb 2022 23:39:47 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Krishna Narayanan Date: Wed, 23 Feb 2022 13:09:36 +0530 Message-ID: Subject: Re: Doubt regarding dg-directives To: Jonathan Wakely Cc: gcc-help , Segher Boessenkool X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Feb 2022 07:39:50 -0000 On Tue, Feb 22, 2022 at 9:44 PM Jonathan Wakely wrote: > On Tue, 22 Feb 2022 at 15:38, Krishna Narayanan wrote: > >> Yes, it does. >> I used dg-warning and not dg warning (that was a sheer typing mistake). >> The warning is about the uninitialized variable being used in the >> testcase yet there is no warning on that line and the test results in >> FAIL. >> I used /* { dg-warning "uninitialized" } */ on that particular line.I >> used the test in gcc.dg, with other directive /* { dg-options "-O2" } >> */ . >> Can you help me where I went wrong? >> > > Don't you need -Wuninitialized in the dg-options as well? > Yes I tried it with /* { dg-options "-O2 -Wuninitialized" } */ but still >> it FAILs.I even tried using -Wmaybe-uninitialized still the outcome is >> same(FAIL:test for warnings), On trying with /* { dg-bogus "uninitialized" >> } */ on the particular line it FAILs saying (test for excess errors) and >> (test for bogus messages) which means it was not expecting a warning but >> warning arises due to which it FAILs. So why did the initial dg-warning not >> pass the test ? Thanks, >> >> >> >> Krishna Narayanan. >> > > >