User account creation filtered due to spam.

Bug 16999 - [3.4 Regression] #ident stopped working
Summary: [3.4 Regression] #ident stopped working
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 3.4.3
Assignee: Andrew Pinski
URL:
Keywords: patch, wrong-code
: 17206 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-08-12 04:14 UTC by marty leisner
Modified: 2004-10-09 00:23 UTC (History)
2 users (show)

See Also:
Host: i686-linux-gnu
Target: i686-linux-gnu
Build:
Known to work: 3.3.3 4.0.0
Known to fail: 3.4.0
Last reconfirmed: 2004-08-12 06:01:47


Attachments
bug with gcc 3.4.1 (685 bytes, text/plain)
2004-08-12 04:22 UTC, marty leisner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marty leisner 2004-08-12 04:14:26 UTC
 
Comment 1 marty leisner 2004-08-12 04:22:11 UTC
Created attachment 6917 [details]
bug with gcc 3.4.1
Comment 2 Andrew Pinski 2004-08-12 04:59:11 UTC
It works for me on 3.4.0:
tin:~/src/gnu/gcctest>~/ia32_linux_gcc3_4/bin/gcc -S -o - pr16999.c -v
Reading specs from /home/gates/pinskia/ia32_linux_gcc3_4/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: ../configure --prefix=/home/gates/pinskia/ia32_linux_gcc3_4 --enable-__cxa_atexit
Thread model: posix
gcc version 3.4.0
 /home/gates/pinskia/ia32_linux_gcc3_4/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1 -quiet -v 
pr16999.c -quiet -dumpbase pr16999.c -mtune=pentiumpro -auxbase-strip - -version -o -
ignoring nonexistent directory "/home/gates/pinskia/ia32_linux_gcc3_4/lib/gcc/i686-pc-linux-gnu/
3.4.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /home/gates/pinskia/ia32_linux_gcc3_4/include
 /home/gates/pinskia/ia32_linux_gcc3_4/lib/gcc/i686-pc-linux-gnu/3.4.0/include
 /usr/include
End of search list.
GNU C version 3.4.0 (i686-pc-linux-gnu)
        compiled by GNU C version 3.4.0.
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128866
        .file   "pr16999.c"
        .ident  "this is an ident"
#APP
        .ident  "trying asm "
        .section        .note.GNU-stack,"",@progbits
        .ident  "GCC: (GNU) 3.4.0"
Comment 3 marty leisner 2004-08-12 05:56:23 UTC
(In reply to comment #2)
> It works for me on 3.4.0:
> tin:~/src/gnu/gcctest>~/ia32_linux_gcc3_4/bin/gcc -S -o - pr16999.c -v
> Reading specs from
/home/gates/pinskia/ia32_linux_gcc3_4/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
> Configured with: ../configure --prefix=/home/gates/pinskia/ia32_linux_gcc3_4
--enable-__cxa_atexit
> Thread model: posix
> gcc version 3.4.0
>  /home/gates/pinskia/ia32_linux_gcc3_4/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1
-quiet -v 
> pr16999.c -quiet -dumpbase pr16999.c -mtune=pentiumpro -auxbase-strip -
-version -o -
> ignoring nonexistent directory
"/home/gates/pinskia/ia32_linux_gcc3_4/lib/gcc/i686-pc-linux-gnu/
> 3.4.0/../../../../i686-pc-linux-gnu/include"
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/local/include
>  /home/gates/pinskia/ia32_linux_gcc3_4/include
>  /home/gates/pinskia/ia32_linux_gcc3_4/lib/gcc/i686-pc-linux-gnu/3.4.0/include
>  /usr/include
> End of search list.
> GNU C version 3.4.0 (i686-pc-linux-gnu)
>         compiled by GNU C version 3.4.0.
> GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128866
>         .file   "pr16999.c"
>         .ident  "this is an ident"
> #APP
>         .ident  "trying asm "
>         .section        .note.GNU-stack,"",@progbits
>         .ident  "GCC: (GNU) 3.4.0"



try it with -save-temps -- this seems to have a bearing...
With -save-temps, we also get:
foo.c:1:10: warning: extra tokens at end of #ident directive
Comment 4 Andrew Pinski 2004-08-12 06:01:47 UTC
Confirmed, interesting.
Comment 5 Mark Mitchell 2004-08-23 19:42:51 UTC
Postponed until GCC 3.4.3.
Comment 6 Andrew Pinski 2004-08-27 06:24:04 UTC
*** Bug 17206 has been marked as a duplicate of this bug. ***
Comment 7 Andrew Pinski 2004-08-27 06:26:31 UTC
Note that was a simple patch in 17206 for fixing the problem:


--- src/contrib/gcc/c-ppoutput.c        2004/08/26 14:10:04     1.1
+++ src/contrib/gcc/c-ppoutput.c        2004/08/26 14:10:32
@@ -292,7 +292,7 @@
          const cpp_string *str)
 {
   maybe_print_line (print.map, line);
-  fprintf (print.outf, "#ident \"%s\"\n", str->text);
+  fprintf (print.outf, "#ident %s\n", str->text);
   print.line++;
 }
Comment 8 Andrew Pinski 2004-10-08 17:04:17 UTC
Patch posted here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00756.html>.

Mine.
Comment 9 CVS Commits 2004-10-08 18:37:13 UTC
Subject: Bug 16999

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pinskia@gcc.gnu.org	2004-10-08 18:37:08

Modified files:
	gcc            : ChangeLog c-ppoutput.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg/cpp: ident-1.c 

Log message:
	2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR c/16999
	* c-ppoutput.c (cb_ident): Don't quote string as it is already
	quoted.
	
	* gcc.dg/cpp/ident-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5809&r2=2.5810
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-ppoutput.c.diff?cvsroot=gcc&r1=1.22&r2=1.23
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4413&r2=1.4414
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/cpp/ident-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 10 Andrew Pinski 2004-10-08 18:37:34 UTC
Fixed on the mainline, will commit the patch to 3.4 branch once I get home.
Comment 11 Andrew Pinski 2004-10-09 00:23:53 UTC
Fixed.
Comment 12 CVS Commits 2004-10-09 00:25:17 UTC
Subject: Bug 16999

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	pinskia@gcc.gnu.org	2004-10-09 00:25:11

Modified files:
	gcc            : ChangeLog c-ppoutput.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg/cpp: ident-1.c 

Log message:
	2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
	
	* gcc.dg/cpp/ident-1.c: New test.
	
	2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR c/16999
	* c-ppoutput.c (cb_ident): Don't quote string as it is already
	quoted.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.650&r2=2.2326.2.651
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-ppoutput.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.11.12.2&r2=1.11.12.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.280&r2=1.3389.2.281
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/cpp/ident-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.2.2.1