public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/24612]  New: [gomp] Bogus "is used uninitialized" warning
@ 2005-11-01 11:04 reichelt at gcc dot gnu dot org
  2005-11-02  8:23 ` [Bug middle-end/24612] " jakub at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-11-01 11:04 UTC (permalink / raw)
  To: gcc-bugs

Compiling the following code with "-fopenmp -O -Wall" yields a bogus warning
(happens with C and C++):

======================================
void foo()
{
    int i;
#pragma omp threadprivate(i)

#pragma omp parallel sections
    {
#pragma omp section
        {
            i = 0;
            ++i;
        }
    }
}
======================================

bug.c: In function 'foo':
bug.c:11: warning: 'i' is used uninitialized in this function


-- 
           Summary: [gomp] Bogus "is used uninitialized" warning
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: diagnostic, openmp
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24612


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/24612] [gomp] Bogus "is used uninitialized" warning
  2005-11-01 11:04 [Bug middle-end/24612] New: [gomp] Bogus "is used uninitialized" warning reichelt at gcc dot gnu dot org
@ 2005-11-02  8:23 ` jakub at gcc dot gnu dot org
  2005-11-03  2:18 ` rth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-11-02  8:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jakub at gcc dot gnu dot org  2005-11-02 08:23 -------
That testcase is IMHO invalid (see
http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00099.html
), but
void
foo (void)
{
  int i;
#pragma omp parallel sections shared (i)
  {
#pragma omp section
    {
      i = 0;
      ++i;
    }
  }
}
which is valid warns too.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24612


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/24612] [gomp] Bogus "is used uninitialized" warning
  2005-11-01 11:04 [Bug middle-end/24612] New: [gomp] Bogus "is used uninitialized" warning reichelt at gcc dot gnu dot org
  2005-11-02  8:23 ` [Bug middle-end/24612] " jakub at gcc dot gnu dot org
@ 2005-11-03  2:18 ` rth at gcc dot gnu dot org
  2005-11-05 23:33 ` rth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-11-03  2:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rth at gcc dot gnu dot org  2005-11-03 02:18 -------
Hum.  I suppose we could just mark the variable TREE_NO_WARNING.  Our
only other option is to pass by reference, and that would suppress any
legitimate warnings as well.


-- 

rth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-03 02:18:10
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24612


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/24612] [gomp] Bogus "is used uninitialized" warning
  2005-11-01 11:04 [Bug middle-end/24612] New: [gomp] Bogus "is used uninitialized" warning reichelt at gcc dot gnu dot org
  2005-11-02  8:23 ` [Bug middle-end/24612] " jakub at gcc dot gnu dot org
  2005-11-03  2:18 ` rth at gcc dot gnu dot org
@ 2005-11-05 23:33 ` rth at gcc dot gnu dot org
  2005-11-06  0:55 ` rth at gcc dot gnu dot org
  2005-11-06  0:56 ` rth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-11-05 23:33 UTC (permalink / raw)
  To: gcc-bugs



-- 

rth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rth at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-11-03 02:18:10         |2005-11-05 23:33:15
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24612


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/24612] [gomp] Bogus "is used uninitialized" warning
  2005-11-01 11:04 [Bug middle-end/24612] New: [gomp] Bogus "is used uninitialized" warning reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-11-05 23:33 ` rth at gcc dot gnu dot org
@ 2005-11-06  0:55 ` rth at gcc dot gnu dot org
  2005-11-06  0:56 ` rth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-11-06  0:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rth at gcc dot gnu dot org  2005-11-06 00:55 -------
Subject: Bug 24612

Author: rth
Date: Sun Nov  6 00:55:43 2005
New Revision: 106551

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106551
Log:
        PR middle-end/24612
        * omp-low.c (expand_rec_input_clauses): Set TREE_NO_WARNING for
        pass-by-value shared variables.

Added:
    branches/gomp-20050608-branch/gcc/testsuite/gcc.dg/gomp/uninit-1.c
Modified:
    branches/gomp-20050608-branch/gcc/ChangeLog.gomp
    branches/gomp-20050608-branch/gcc/omp-low.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24612


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/24612] [gomp] Bogus "is used uninitialized" warning
  2005-11-01 11:04 [Bug middle-end/24612] New: [gomp] Bogus "is used uninitialized" warning reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-11-06  0:55 ` rth at gcc dot gnu dot org
@ 2005-11-06  0:56 ` rth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-11-06  0:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rth at gcc dot gnu dot org  2005-11-06 00:56 -------
Fixed.


-- 

rth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24612


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-11-06  0:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-01 11:04 [Bug middle-end/24612] New: [gomp] Bogus "is used uninitialized" warning reichelt at gcc dot gnu dot org
2005-11-02  8:23 ` [Bug middle-end/24612] " jakub at gcc dot gnu dot org
2005-11-03  2:18 ` rth at gcc dot gnu dot org
2005-11-05 23:33 ` rth at gcc dot gnu dot org
2005-11-06  0:55 ` rth at gcc dot gnu dot org
2005-11-06  0:56 ` rth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).