[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-08-19 Thread meadori at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

meadori at gcc dot gnu.org changed:

   What|Removed |Added

 CC||meadori at gcc dot gnu.org

--- Comment #14 from meadori at gcc dot gnu.org ---
(In reply to hmb from comment #13)
 Created attachment 30201 [details]
 preprocessed source code
 
 Attaching the preprocessed source code

Here is a reduction (as of trunk today):

$ cat test.c
#include setjmp.h
#include stdio.h

struct node
{
  struct node *next;
  char *name;
} *list;

struct node *list;
struct node *head (void);

sigjmp_buf *bar (void);

int baz (void)
{
  struct node *n;
  int varseen = 0;

  list = head ();
  for (n = list; n; n = n-next)
{
  if (!varseen)
  varseen = 1;

  sigjmp_buf *buf = bar ();
  __sigsetjmp (*buf, 1);
}

  if (!varseen)
return 0;
  return 1;
}
$ i686-pc-linux-gnu-gcc --version
i686-pc-linux-gnu-gcc (GCC) 4.9.0 20130819 (experimental)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ i686-pc-linux-gnu-gcc -Wall -O2 -c test.c
test.c: In function 'baz':
test.c:26:19: warning: 'buf' may be used uninitialized in this function
[-Wmaybe-uninitialized]
   sigjmp_buf *buf = bar ();
   ^


[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-05-27 Thread muhammad_bilal at mentor dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

hmb muhammad_bilal at mentor dot com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #12 from hmb muhammad_bilal at mentor dot com ---
I got enother error in gdb source code with same building step as I described
above:

/home/mbilal/gcc-svn/install/bin/gcc -save-temps -g -O2   -I. -I.././../src/gdb
-I.././../src/gdb/common -I.././../src/gdb/config
-DLOCALEDIR=\/home/mbilal/gdb-git/gcc_install_bug_report/share/locale\
-DHAVE_CONFIG_H -I.././../src/gdb/../include/opcode
-I.././../src/gdb/../opcodes/.. -I.././../src/gdb/../readline/.. -I../bfd
-I.././../src/gdb/../bfd -I.././../src/gdb/../include -I../libdecnumber
-I.././../src/gdb/../libdecnumber  -I.././../src/gdb/gnulib/import
-Ibuild-gnulib/import   -DTUI=1  -I/usr/include/python2.7
-I/usr/include/python2.7 -Wall -Wdeclaration-after-statement -Wpointer-arith
-Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch
-Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement
-Wempty-body -Wformat-nonliteral -Werror -c -o value.o -MT value.o -MMD -MP -MF
.deps/value.Tpo .././../src/gdb/value.c
.././../src/gdb/value.c: In function ‘show_convenience’:
.././../src/gdb/value.c:2247:21: error: ‘buf’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
   TRY_CATCH (ex, RETURN_MASK_ERROR)
 ^
cc1: all warnings being treated as errors
make[2]: *** [value.o] Error 1
make[2]: Leaving directory `/home/mbilal/gdb-git/gcc-obj_bug_report/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/home/mbilal/gdb-git/gcc-obj_bug_report'
make: *** [all] Error 2

[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-05-27 Thread muhammad_bilal at mentor dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

--- Comment #13 from hmb muhammad_bilal at mentor dot com ---
Created attachment 30201
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30201action=edit
preprocessed source code

Attaching the preprocessed source code


[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-05-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

--- Comment #10 from Richard Biener rguenth at gcc dot gnu.org ---
#include setjmp.h
jmp_buf buf;
void foo (int);
void bar (int) __attribute__((leaf));
void enumerate_locals (int indent)
{
  foo (0);
  while (indent--) 
{
  int local_indent = 8 + (8 * indent);
  if (local_indent != 8)
{
  setjmp (buf);
  bar (local_indent);
}
}
  foo (1);
}


warns about uninitialized local_indent.  The abnormal edges we insert
for foo (0) make undefined values flow into the setjmp block.


[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-05-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Fri May 24 12:44:58 2013
New Revision: 199289

URL: http://gcc.gnu.org/viewcvs?rev=199289root=gccview=rev
Log:
2013-05-24  Richard Biener  rguent...@suse.de

PR tree-optimization/57287
* tree-ssa-uninit.c (compute_uninit_opnds_pos): Disregard
all SSA names that occur in abnormal PHIs.

* gcc.dg/pr57287.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/pr57287.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-uninit.c


[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-05-23 Thread muhammad_bilal at mentor dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

--- Comment #4 from hmb muhammad_bilal at mentor dot com ---
I am attaching the all preprocessed source code of GDB
here is the link https://www.dropbox.com/s/ldml34p3lov867w/gcc-bug.zip


[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-05-23 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #5 from Richard Biener rguenth at gcc dot gnu.org ---
Confirmed with -O2 -Wall.


[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-05-23 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

--- Comment #6 from Richard Biener rguenth at gcc dot gnu.org ---
Created attachment 30172
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30172action=edit
preprocessed source


[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-05-23 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 CC||xinliangli at gmail dot com

--- Comment #7 from Richard Biener rguenth at gcc dot gnu.org ---
tree-ssa-uninit.c somehow fails to properly handle abnormal edges.

Index: tree-ssa-uninit.c
===
--- tree-ssa-uninit.c   (revision 199249)
+++ tree-ssa-uninit.c   (working copy)
@@ -1919,7 +1919,8 @@ find_uninit_use (gimple phi, unsigned un
 }

   worklist-safe_push (use_stmt);
-  pointer_set_insert (possibly_undefined_names, phi_result);
+ if (!SSA_NAME_OCCURS_IN_ABNORMAL_PHI (phi_result))
+   pointer_set_insert (possibly_undefined_names, phi_result);
 }
 }

fixes the issue but that doesn't look the very best place to fix it
and it doesn't look fully correct.  It should be enough to not consider
values flowing across abnormal edges - but that's already done (but somehow
not in a complete manner).

I'm trying to reduce the testcase to get a better idea what is going wrong
here.


[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-05-23 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

--- Comment #8 from Richard Biener rguenth at gcc dot gnu.org ---
Created attachment 30175
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30175action=edit
somewhat reduced testcase

Autoreduced on level 0.


[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-05-23 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

--- Comment #9 from Richard Biener rguenth at gcc dot gnu.org ---
Created attachment 30176
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30176action=edit
more reduced


[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-05-22 Thread palves at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

--- Comment #3 from Pedro Alves palves at redhat dot com ---
hmb,

could you do that?

See instructions here: http://gcc.gnu.org/bugs/


[Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04

2013-05-15 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287

Andrew Pinski pinskia at gcc dot gnu.org changed:

   What|Removed |Added

  Component|c   |middle-end
   Severity|blocker |normal