* [Bug middle-end/39015] [4.3 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
@ 2009-01-29 9:10 ` jdassen at debian dot org
2009-01-29 9:11 ` jdassen at debian dot org
` (15 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: jdassen at debian dot org @ 2009-01-29 9:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jdassen at debian dot org 2009-01-29 09:10 -------
Created an attachment (id=17206)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17206&action=view)
The (gtk-doc-tools generated) gsf-scan.c file which gets miscompiled
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
2009-01-29 9:10 ` [Bug middle-end/39015] " jdassen at debian dot org
@ 2009-01-29 9:11 ` jdassen at debian dot org
2009-01-29 10:01 ` rguenth at gcc dot gnu dot org
` (14 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: jdassen at debian dot org @ 2009-01-29 9:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jdassen at debian dot org 2009-01-29 09:11 -------
Created an attachment (id=17207)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17207&action=view)
The (gtk-doc-tools generated) gsf-scan.c file which gets miscompiled,
preprocessed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
2009-01-29 9:10 ` [Bug middle-end/39015] " jdassen at debian dot org
2009-01-29 9:11 ` jdassen at debian dot org
@ 2009-01-29 10:01 ` rguenth at gcc dot gnu dot org
2009-01-29 17:53 ` Andrew Thomas Pinski
2009-01-29 10:14 ` doko at ubuntu dot com
` (13 subsequent siblings)
16 siblings, 1 reply; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-29 10:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-01-29 10:01 -------
The best option would be to revert that patch on the branch.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sje at gcc dot gnu dot org,
| |rguenth at gcc dot gnu dot
| |org
Priority|P3 |P1
Target Milestone|--- |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Bug middle-end/39015] [4.3 regression] wrong code building libgsf
2009-01-29 10:01 ` rguenth at gcc dot gnu dot org
@ 2009-01-29 17:53 ` Andrew Thomas Pinski
0 siblings, 0 replies; 19+ messages in thread
From: Andrew Thomas Pinski @ 2009-01-29 17:53 UTC (permalink / raw)
To: gcc-bugzilla; +Cc: gcc-bugs
Sent from my iPhone
On Jan 29, 2009, at 2:01 AM, "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org
> wrote:
>
>
> ------- Comment #3 from rguenth at gcc dot gnu dot org 2009-01-29
> 10:01 -------
> The best option would be to revert that patch on the branch.
Except it alone could not cause wrong code. Some other pass is
causing it. And then again with a testcase it is hard to figure out
what is going wrong. That patch just disables one small optimization
in one case.
>
>
>
> --
>
> rguenth at gcc dot gnu dot org changed:
>
> What |Removed |Added
> ---
> ---
> ----------------------------------------------------------------------
> CC| |sje at gcc dot gnu
> dot org,
> | |rguenth at gcc dot
> gnu dot
> | |org
> Priority|P3 |P1
> Target Milestone|--- |4.3.4
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (2 preceding siblings ...)
2009-01-29 10:01 ` rguenth at gcc dot gnu dot org
@ 2009-01-29 10:14 ` doko at ubuntu dot com
2009-01-29 10:24 ` jdassen at debian dot org
` (12 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: doko at ubuntu dot com @ 2009-01-29 10:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from doko at ubuntu dot com 2009-01-29 10:14 -------
when Ray wrote he tested with a snapshot build, I assume this was 20090107
without the patch applied, so the status on the trunk is not known yet. will
test with current trunk later.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (3 preceding siblings ...)
2009-01-29 10:14 ` doko at ubuntu dot com
@ 2009-01-29 10:24 ` jdassen at debian dot org
2009-01-29 17:01 ` sje at cup dot hp dot com
` (11 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: jdassen at debian dot org @ 2009-01-29 10:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jdassen at debian dot org 2009-01-29 10:24 -------
(In reply to comment #4)
> when Ray wrote he tested with a snapshot build, I assume this was 20090107
> without the patch applied,
Yes, I was using sid's gcc-snapshot 20090107-1.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (4 preceding siblings ...)
2009-01-29 10:24 ` jdassen at debian dot org
@ 2009-01-29 17:01 ` sje at cup dot hp dot com
2009-01-29 17:53 ` pinskia at gmail dot com
` (10 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: sje at cup dot hp dot com @ 2009-01-29 17:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from sje at cup dot hp dot com 2009-01-29 17:00 -------
What GCC options was gsf-scan.i compiled with? I am trying to see what
variables are getting/not getting promoted during the compilation and I am not
seeing it affect any variables if I just compile gsf-scan.i with -O[0123].
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (5 preceding siblings ...)
2009-01-29 17:01 ` sje at cup dot hp dot com
@ 2009-01-29 17:53 ` pinskia at gmail dot com
2009-01-29 17:53 ` jdassen at debian dot org
` (9 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: pinskia at gmail dot com @ 2009-01-29 17:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gmail dot com 2009-01-29 17:53 -------
Subject: Re: [4.3 regression] wrong code building libgsf
Sent from my iPhone
On Jan 29, 2009, at 2:01 AM, "rguenth at gcc dot gnu dot org"
<gcc-bugzilla@gcc.gnu.org
> wrote:
>
>
> ------- Comment #3 from rguenth at gcc dot gnu dot org 2009-01-29
> 10:01 -------
> The best option would be to revert that patch on the branch.
Except it alone could not cause wrong code. Some other pass is
causing it. And then again with a testcase it is hard to figure out
what is going wrong. That patch just disables one small optimization
in one case.
>
>
>
> --
>
> rguenth at gcc dot gnu dot org changed:
>
> What |Removed |Added
> ---
> ---
> ----------------------------------------------------------------------
> CC| |sje at gcc dot gnu
> dot org,
> | |rguenth at gcc dot
> gnu dot
> | |org
> Priority|P3 |P1
> Target Milestone|--- |4.3.4
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (6 preceding siblings ...)
2009-01-29 17:53 ` pinskia at gmail dot com
@ 2009-01-29 17:53 ` jdassen at debian dot org
2009-01-29 18:57 ` sje at cup dot hp dot com
` (8 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: jdassen at debian dot org @ 2009-01-29 17:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jdassen at debian dot org 2009-01-29 17:53 -------
(In reply to comment #3)
> The best option would be to revert that patch on the branch.
Matthias did that in the 4.3.3-3 packages and with them, the problem has
indeed gone away.
(In reply to comment #6)
> What GCC options was gsf-scan.i compiled with?
compile line: /bin/sh ../libtool --mode=compile cc -Wl,-z,defs -Wl,-O1
-Wl,--as-needed -O2 -Wall -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wno-sign-compare -DG_DISABLE_DEPRECATED -Wno-system-headers
-Wfloat-equal -Wpointer-arith -Wbad-function-cast -Wwrite-strings
-Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wformat -Wnested-externs -Winline
-Wdeclaration-after-statement -Wundef -W -Wmissing-noreturn
-Wmissing-format-attribute -Wno-pointer-sign -DLIBGSF_GNOMEVFS_VIA_GIO -I../..
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2
-O2 -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith
-Wno-sign-compare -DG_DISABLE_DEPRECATED -Wno-system-headers -Wfloat-equal
-Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wsign-compare
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wformat -Wnested-externs -Winline
-Wdeclaration-after-statement -Wundef -W -Wmissing-noreturn
-Wmissing-format-attribute -Wno-pointer-sign -DLIBGSF_GNOMEVFS_VIA_GIO -c -o
gsf-scan.lo gsf-scan.c
link line: /bin/sh ../libtool --mode=link cc -Wl,-z,defs -Wl,-O1
-Wl,--as-needed -O2 -Wall -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wno-sign-compare -DG_DISABLE_DEPRECATED -Wno-system-headers
-Wfloat-equal -Wpointer-arith -Wbad-function-cast -Wwrite-strings
-Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wformat -Wnested-externs -Winline
-Wdeclaration-after-statement -Wundef -W -Wmissing-noreturn
-Wmissing-format-attribute -Wno-pointer-sign -DLIBGSF_GNOMEVFS_VIA_GIO
-no-undefined -o gsf-scan gsf-scan.lo ../gsf/libgsf-1.la -lgobject-2.0
-lglib-2.0 -lxml2 -no-undefined
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (7 preceding siblings ...)
2009-01-29 17:53 ` jdassen at debian dot org
@ 2009-01-29 18:57 ` sje at cup dot hp dot com
2009-01-29 22:36 ` [Bug middle-end/39015] [4.3/4.4 " doko at ubuntu dot com
` (7 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: sje at cup dot hp dot com @ 2009-01-29 18:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from sje at cup dot hp dot com 2009-01-29 18:57 -------
So far I have been unable to reproduce this problem. When compiling gsf-scan.i
I do not even reach the code that I changed in PR 38615 and I get the same code
with or without my change included.
Assuming there is a way to trigger this, I wonder if the program is legal. In
particular I was looking at the initialization of GbArgTable which has a lot of
holes in it. If the optimization affects whether or not these holes get set to
zero and if the program is accessing these uninitialized locations that could
cause a change in behaviour.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3/4.4 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (8 preceding siblings ...)
2009-01-29 18:57 ` sje at cup dot hp dot com
@ 2009-01-29 22:36 ` doko at ubuntu dot com
2009-01-29 22:40 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: doko at ubuntu dot com @ 2009-01-29 22:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from doko at ubuntu dot com 2009-01-29 22:36 -------
I'm able to reproduce it with trunk 20090129. The gsf-scan executable links
against the just built libgsf.so, so I assume we have to look for a miscompiled
file in libgsf.
--
doko at ubuntu dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|4.3.4 |4.3.4 4.4.0
Summary|[4.3 regression] wrong code |[4.3/4.4 regression] wrong
|building libgsf |code building libgsf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3/4.4 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (9 preceding siblings ...)
2009-01-29 22:36 ` [Bug middle-end/39015] [4.3/4.4 " doko at ubuntu dot com
@ 2009-01-29 22:40 ` pinskia at gcc dot gnu dot org
2009-01-29 22:42 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-29 22:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from pinskia at gcc dot gnu dot org 2009-01-29 22:39 -------
I don't see anything in gsf-scan.c which would have been changed by that patch.
All the arrays are already marked as static. The only ones that changed by
that patch are auto arrays.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3/4.4 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (10 preceding siblings ...)
2009-01-29 22:40 ` pinskia at gcc dot gnu dot org
@ 2009-01-29 22:42 ` pinskia at gcc dot gnu dot org
2009-01-30 10:58 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-29 22:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pinskia at gcc dot gnu dot org 2009-01-29 22:41 -------
(In reply to comment #9)
> Assuming there is a way to trigger this, I wonder if the program is legal. In
> particular I was looking at the initialization of GbArgTable which has a lot of
> holes in it.
Those holes are all zero but the array GbArgTable is already declared as static
so there will be no difference between before and after the patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3/4.4 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (11 preceding siblings ...)
2009-01-29 22:42 ` pinskia at gcc dot gnu dot org
@ 2009-01-30 10:58 ` jakub at gcc dot gnu dot org
2009-01-30 11:38 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-30 10:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from jakub at gcc dot gnu dot org 2009-01-30 10:58 -------
Nothing changed in gsf-scan.c, but out of the 3 objects in libgsf.so that
changed it seems to be gsf-output-csv.c where r143570 makes difference for
gsf-scan. Looking at it now...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3/4.4 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (12 preceding siblings ...)
2009-01-30 10:58 ` jakub at gcc dot gnu dot org
@ 2009-01-30 11:38 ` jakub at gcc dot gnu dot org
2009-01-30 11:39 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-30 11:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from jakub at gcc dot gnu dot org 2009-01-30 11:38 -------
And clearly the bug is in libgsf, not in gcc.
g_enum_register_static documentation says:
GObject keeps a reference to the data, so it cannot be stack-allocated.
so this relies on this optimization. gsf_output_csv_quoting_mode_get_type
just needs to be fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|wrong-code |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3/4.4 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (13 preceding siblings ...)
2009-01-30 11:38 ` jakub at gcc dot gnu dot org
@ 2009-01-30 11:39 ` jakub at gcc dot gnu dot org
2009-01-30 11:40 ` jakub at gcc dot gnu dot org
2009-01-30 17:03 ` jdassen at debian dot org
16 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-30 11:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from jakub at gcc dot gnu dot org 2009-01-30 11:39 -------
Created an attachment (id=17213)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17213&action=view)
libgsf-enum-register.patch
Patch that fixes this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3/4.4 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (14 preceding siblings ...)
2009-01-30 11:39 ` jakub at gcc dot gnu dot org
@ 2009-01-30 11:40 ` jakub at gcc dot gnu dot org
2009-01-30 17:03 ` jdassen at debian dot org
16 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-30 11:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from jakub at gcc dot gnu dot org 2009-01-30 11:40 -------
Invalid.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |caolanm at redhat dot com
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug middle-end/39015] [4.3/4.4 regression] wrong code building libgsf
2009-01-29 5:39 [Bug middle-end/39015] New: [4.3 regression] wrong code building libgsf doko at ubuntu dot com
` (15 preceding siblings ...)
2009-01-30 11:40 ` jakub at gcc dot gnu dot org
@ 2009-01-30 17:03 ` jdassen at debian dot org
16 siblings, 0 replies; 19+ messages in thread
From: jdassen at debian dot org @ 2009-01-30 17:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from jdassen at debian dot org 2009-01-30 17:02 -------
Now fixed in libgsf upstream:
http://svn.gnome.org/viewvc/libgsf?view=revision&revision=1039
Thank you very much!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015
^ permalink raw reply [flat|nested] 19+ messages in thread