[Bug preprocessor/34869] valgrind error indication in testsuite from _cpp_lex_token (lex.c:783) with gcc.dg/cpp/line5.c

2009-04-23 Thread lauras at gcc dot gnu dot org


--- Comment #1 from lauras at gcc dot gnu dot org  2009-04-23 17:09 ---
It looks like _cpp_lex_direct lexes ahead even if there unused lookahead
tokens, which later causes uninitialized tokens as reported by valgrind. I am
bootstrapping the patch below which seems to fix the issue.

Index: libcpp/lex.c
===
--- libcpp/lex.c(revision 146637)
+++ libcpp/lex.c(working copy)
@@ -880,8 +880,8 @@
 }

 /* Lex a token into RESULT (external interface).  Takes care of issues
-   like directive handling, token lookahead, multiple include
-   optimization and skipping.  */
+   like directive handling, multiple include optimization and
+   skipping.  */
 const cpp_token *
 _cpp_lex_token (cpp_reader *pfile)
 {
@@ -900,13 +900,7 @@
  || pfile-cur_token = pfile-cur_run-limit)
abort ();

-  if (pfile-lookaheads)
-   {
- pfile-lookaheads--;
- result = pfile-cur_token++;
-   }
-  else
-   result = _cpp_lex_direct (pfile);
+  result = _cpp_lex_direct (pfile);

   if (result-flags  BOL)
{
@@ -1003,10 +997,11 @@
 /* Lex a token into pfile-cur_token, which is also incremented, to
get diagnostics pointing to the correct location.

-   Does not handle issues such as token lookahead, multiple-include
-   optimization, directives, skipping etc.  This function is only
-   suitable for use by _cpp_lex_token, and in special cases like
-   lex_expansion_token which doesn't care for any of these issues.
+   Is able to handle token lookahead, but does not handle issues such
+   as multiple-include optimization, directives, skipping etc.  This
+   function is only suitable for use by _cpp_lex_token, and in special
+   cases like lex_expansion_token which doesn't care for any of these
+   issues.

When meeting a newline, returns CPP_EOF if parsing a directive,
otherwise returns to the start of the token buffer if permissible.
@@ -1019,6 +1014,12 @@
   const unsigned char *comment_start;
   cpp_token *result = pfile-cur_token++;

+  if (pfile-lookaheads)
+{
+  pfile-lookaheads--;
+  return result;
+}
+
  fresh_line:
   result-flags = 0;
   buffer = pfile-buffer;


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||lauras at gcc dot gnu dot
   ||org
   Last reconfirmed|2008-04-18 16:38:18 |2009-04-23 17:09:55
   date||


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



[Bug target/34865] valgrind error indication in testsuite from i386.c:merge_classes

2009-04-23 Thread lauras at gcc dot gnu dot org


--- Comment #3 from lauras at gcc dot gnu dot org  2009-04-24 05:50 ---
It was later reported as PR/38781 and fixed.

No valgrind errors here with r146637.

*** This bug has been marked as a duplicate of 38781 ***


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


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



[Bug target/38781] PR38151: valgrind finds problem

2009-04-23 Thread lauras at gcc dot gnu dot org


--- Comment #8 from lauras at gcc dot gnu dot org  2009-04-24 05:50 ---
*** Bug 34865 has been marked as a duplicate of this bug. ***


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||hp at gcc dot gnu dot org


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



[Bug c/34867] valgrind error indication in testsuite from c-lex.c:996:c_lex_with_flags for gcc.dg/cpp/charconst.c

2008-06-27 Thread lauras at gcc dot gnu dot org


--- Comment #2 from lauras at gcc dot gnu dot org  2008-06-27 12:30 ---
Subject: Bug 34867

Author: lauras
Date: Fri Jun 27 12:29:55 2008
New Revision: 137175

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=137175
Log:
2008-06-27  Laurynas Biveinis  [EMAIL PROTECTED]

PR c/34867
* c-lex.c (lex_charconst): Initialize unsignedp.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-lex.c


-- 


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



[Bug c/34867] valgrind error indication in testsuite from c-lex.c:996:c_lex_with_flags for gcc.dg/cpp/charconst.c

2008-06-27 Thread lauras at gcc dot gnu dot org


--- Comment #3 from lauras at gcc dot gnu dot org  2008-06-27 12:32 ---
Fixed on trunk.


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||lauras at gcc dot gnu dot
   ||org
 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.4.0


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



[Bug middle-end/34905] valgrind error indication from testsuite typeck.c:comptypes

2008-06-22 Thread lauras at gcc dot gnu dot org


--- Comment #3 from lauras at gcc dot gnu dot org  2008-06-22 14:49 ---
Closing since valgrind errors are unreproducible now


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WORKSFORME


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



[Bug c/34867] valgrind error indication in testsuite from c-lex.c:996:c_lex_with_flags for gcc.dg/cpp/charconst.c

2008-06-22 Thread lauras at gcc dot gnu dot org


--- Comment #1 from lauras at gcc dot gnu dot org  2008-06-22 15:23 ---
Confirmed with r137000.

To set unsignedp value, lex_charconst calls cpp_interpret_charconst. Here it
quits early with an error, leaving unsignedp uninitialized. I will post a patch
to fix.


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |lauras at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-06-22 15:23:44
   date||


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



[Bug middle-end/34906] valgrind error indication from testsuite gimplify.c: gimplify_asm_expr

2008-06-22 Thread lauras at gcc dot gnu dot org


--- Comment #3 from lauras at gcc dot gnu dot org  2008-06-22 15:28 ---
Subject: Bug 34906

Author: lauras
Date: Sun Jun 22 15:28:04 2008
New Revision: 137020

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=137020
Log:
2008-06-22  Laurynas Biveinis  [EMAIL PROTECTED]

PR middle-end/34906
* gimplify.c (gimplify_asm_expr): Check the return code of
parse_output_constraint call, set function return and is_inout
value if it failed.



Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimplify.c


-- 


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



[Bug middle-end/34906] valgrind error indication from testsuite gimplify.c: gimplify_asm_expr

2008-06-22 Thread lauras at gcc dot gnu dot org


--- Comment #4 from lauras at gcc dot gnu dot org  2008-06-22 15:30 ---
Fixed on trunk.


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug fortran/36276] [4.3 Regression] possible issue with opening fortran files?

2008-06-21 Thread lauras at gcc dot gnu dot org


--- Comment #10 from lauras at gcc dot gnu dot org  2008-06-21 15:30 ---
Subject: Bug 36276

Author: lauras
Date: Sat Jun 21 15:29:44 2008
New Revision: 137001

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=137001
Log:
2008-06-20  Laurynas Biveinis  [EMAIL PROTECTED]
Tobias Burnus  [EMAIL PROTECTED]

PR fortran/34908
PR fortran/36276
* scanner.c (preprocessor_line): do not call gfc_free for
current_file-filename if it differs from filename.


Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/scanner.c


-- 


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



[Bug debug/34908] valgrind error indication from testsuite hashtab.c : htab_hash_string

2008-06-21 Thread lauras at gcc dot gnu dot org


--- Comment #4 from lauras at gcc dot gnu dot org  2008-06-21 15:30 ---
Subject: Bug 34908

Author: lauras
Date: Sat Jun 21 15:29:44 2008
New Revision: 137001

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=137001
Log:
2008-06-20  Laurynas Biveinis  [EMAIL PROTECTED]
Tobias Burnus  [EMAIL PROTECTED]

PR fortran/34908
PR fortran/36276
* scanner.c (preprocessor_line): do not call gfc_free for
current_file-filename if it differs from filename.


Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/scanner.c


-- 


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



[Bug debug/34908] valgrind error indication from testsuite hashtab.c : htab_hash_string

2008-06-21 Thread lauras at gcc dot gnu dot org


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.3.2


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



[Bug fortran/36276] [4.3 Regression] possible issue with opening fortran files?

2008-06-21 Thread lauras at gcc dot gnu dot org


--- Comment #11 from lauras at gcc dot gnu dot org  2008-06-21 21:40 ---
Closing the bug as the fix has been commited to the 4.3 branch too


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug fortran/36276] [4.3/4.4 Regression] possible issue with opening fortran files?

2008-06-20 Thread lauras at gcc dot gnu dot org


--- Comment #8 from lauras at gcc dot gnu dot org  2008-06-20 13:57 ---
Subject: Bug 36276

Author: lauras
Date: Fri Jun 20 13:57:00 2008
New Revision: 136989

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=136989
Log:
2008-06-20  Laurynas Biveinis  [EMAIL PROTECTED]
Tobias Burnus  [EMAIL PROTECTED]

PR fortran/34908
PR fortran/36276
* scanner.c (preprocessor_line): do not call gfc_free for
current_file-filename if it differs from filename.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/scanner.c


-- 


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



[Bug debug/34908] valgrind error indication from testsuite hashtab.c : htab_hash_string

2008-06-20 Thread lauras at gcc dot gnu dot org


--- Comment #2 from lauras at gcc dot gnu dot org  2008-06-20 13:57 ---
Subject: Bug 34908

Author: lauras
Date: Fri Jun 20 13:57:00 2008
New Revision: 136989

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=136989
Log:
2008-06-20  Laurynas Biveinis  [EMAIL PROTECTED]
Tobias Burnus  [EMAIL PROTECTED]

PR fortran/34908
PR fortran/36276
* scanner.c (preprocessor_line): do not call gfc_free for
current_file-filename if it differs from filename.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/scanner.c


-- 


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



[Bug target/33359] [4.3 Regression] libgcc is miscompiled on SH

2007-09-17 Thread lauras at gcc dot gnu dot org


--- Comment #3 from lauras at gcc dot gnu dot org  2007-09-17 22:27 ---
Thanks for helping with this issue. Do you want to commit this to gc-improv
branch?

(Removing pinskia from CC, as this must be spam to him)


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 CC|pinskia at gcc dot gnu dot  |
   |org |


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



[Bug middle-end/33351] [4.3 Regression] segfault in assembler function

2007-09-09 Thread lauras at gcc dot gnu dot org


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING


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



[Bug rtl-optimization/33346] [4.3 Regression] g++.old-deja/g++.eh/ia64-1.C ICEs at -O1 on spu-elf

2007-09-09 Thread lauras at gcc dot gnu dot org


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|lauras at gcc dot gnu dot   |unassigned at gcc dot gnu
   |org |dot org
 Status|ASSIGNED|NEW


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



[Bug middle-end/33351] [4.3 Regression] segfault in assembler function

2007-09-08 Thread lauras at gcc dot gnu dot org


--- Comment #4 from lauras at gcc dot gnu dot org  2007-09-08 18:36 ---
It sure looks like it is caused by my patch. I will be able to take care of
that on Monday. 

I think this change should fix it (completely untested): rewrite


for (p = NEXT_INSN (prev); p != next; p = NEXT_INSN (p))
  if (p != insn  INSN_P (p)
 ...

as 
rtx next_p;
...
for (p = NEXT_INSN (prev); p != next; p = next_p)
  {
next_p = NEXT_INSN (p);
if (p != insn  INSN_P (p))
  ...
  }

Sorry for the trouble.


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |lauras at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-09-08 12:45:26 |2007-09-08 18:36:18
   date||


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



[Bug rtl-optimization/33346] [4.3 Regression] g++.old-deja/g++.eh/ia64-1.C ICEs at -O1 on spu-elf

2007-09-08 Thread lauras at gcc dot gnu dot org


--- Comment #2 from lauras at gcc dot gnu dot org  2007-09-08 19:40 ---
I will be able to handle this on Monday. If it's urgent, you can try (untested)
suggestion at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33351#c4

Sorry for the trouble.


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||lauras at gcc dot gnu dot
   ||org
 AssignedTo|unassigned at gcc dot gnu   |lauras at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2007-09-08 19:40:49
   date||


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



[Bug other/29049] possible problem: building gcc = 4.2 on i686 GNU/Linux|SMP (non-64bit) platform fails

2007-08-01 Thread lauras at gcc dot gnu dot org


--- Comment #30 from lauras at gcc dot gnu dot org  2007-08-02 01:13 ---
For the record, this was caused by obsolete awk version, please upgrade if you
experience this problem.  The need to document awk prerequisite is tracked in
PR 30739.


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|WORKSFORME  |


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



[Bug other/29049] possible problem: building gcc = 4.2 on i686 GNU/Linux|SMP (non-64bit) platform fails

2007-08-01 Thread lauras at gcc dot gnu dot org


--- Comment #31 from lauras at gcc dot gnu dot org  2007-08-02 01:14 ---
Closing.


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug bootstrap/20437] bootstrap --enable-maintainer-mode broken

2006-07-10 Thread lauras at gcc dot gnu dot org


--- Comment #4 from lauras at gcc dot gnu dot org  2006-07-10 17:58 ---
Subject: Bug 20437

Author: lauras
Date: Mon Jul 10 17:58:18 2006
New Revision: 115310

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=115310
Log:
fixincludes:
2006-07-10  Laurynas Biveinis  [EMAIL PROTECTED]

PR bootstrap/20437
* Makefile.in (configure, config.h.in): change into $(srcdir)
before autoconf or autoheader call.

gcc:
2006-07-10  Laurynas Biveinis  [EMAIL PROTECTED]

PR bootstrap/20437
* Makefile.in (configure): add missing aclocal.m4 and acinclude.m4
dependencies.

Modified:
trunk/fixincludes/ChangeLog
trunk/fixincludes/Makefile.in
trunk/gcc/ChangeLog
trunk/gcc/Makefile.in


-- 


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



[Bug bootstrap/20437] bootstrap --enable-maintainer-mode broken

2006-07-10 Thread lauras at gcc dot gnu dot org


--- Comment #5 from lauras at gcc dot gnu dot org  2006-07-10 18:04 ---
The fix will appear in 4.2.0, thanks for your report.


-- 

lauras at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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