f77 bug

2007-07-31 Thread werner
The f77 compiler seems to have a BUG what makes  - for me - it impossible to 
use seriously

I have a lot of very big old f77 progs, what I want to revise, and put open.

f77 DONT PRODUCE A COMPILING LIST FILE,  i.e. listing the source-code with line 
number and errors/warnings after each line !   At least, 
since months im searching
this possibility.   Old-time compilers had this option, f.ex. compile with #f77 
-l   or something like this

I need this urgently. Without this, I cannot compile/adapt/make error-free 
these progs

Pls. put in a new option, that f77 makes such a list at compiling time 
!!!

w.landgraf
[EMAIL PROTECTED]
 



[Bug c/56098] New: conditional write through volatile pointer produces unintended read

2013-01-24 Thread werner at almesberger dot net


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



 Bug #: 56098

   Summary: conditional write through volatile pointer produces

unintended read

Classification: Unclassified

   Product: gcc

   Version: 4.7.2

Status: UNCONFIRMED

  Severity: major

  Priority: P3

 Component: c

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: wer...@almesberger.net





If compiled with -O2 or greater and without -fno-strict-aliasing, the following

code



volatile int *ptr;



void problem(int flag)

{

*ptr = 1;

if (flag)

*ptr = 2;

}



produces an unintended read, as if the "if" statement had continued with



else

*ptr = *ptr;



Code generated by gcc 4.7.2 on Ubuntu on x86-64 when invoked with

gcc-4.7 -Wall -Wextra -O2 -S bug.c



...

problem:

.LFB0:

.cfi_startproc

movqptr(%rip), %rax

testl   %edi, %edi

movl$2, %edx

movl$1, (%rax)

jne .L2

movl(%rax), %edx<<< unexpected

.L2:

movl%edx, (%rax)

ret

.cfi_endproc

...



This happens with

- gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 for x86-64,

- gcc-4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 for x86-64,

- mipsel-openwrt-linux-gcc (Linaro GCC 4.6-2012.02) 4.6.3 20120201 (prerelease)

for MIPS,

and I've had someone confirm it for an ARM target (without further details) as

well.



-Os instead of -O2 has the same effect. The unintended read disappears if

optimizing with -O1 or less, or with -fno-strict-aliasing.



This bears a striking resemblance to Bug 15456 and maybe Bug 5395, except that

these were for C++ while this is plain C.


[Bug middle-end/56098] [4.6/4.7 Regression] conditional write through volatile pointer produces unintended read

2013-01-25 Thread werner at almesberger dot net


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



--- Comment #6 from werner at almesberger dot net 2013-01-25 22:46:17 UTC ---

Thanks for the analysis and the fixes ! I'll try them soonish.



Regarding work-arounds, the ones I mentioned for my original code snippet

(i.e., -O1 or -fno-strict-aliasing) aren't sufficient in the following more

general case:



volatile void *p;



#define P  (*(volatile int *) (p+8))





void foo(int x)

{

P = 1;

if (x)

P = 2;

}



This is for gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 on x86-64. The offset (8)

may be architecture-specific. For values < 8, correct code is generated with

-O1 (but not -O2 or higher).



The good news is that -fno-tree-cselim does indeed avoid the bad read in all

cases I've tried, with any optimization level.


[Bug middle-end/56098] [4.6/4.7 Regression] conditional write through volatile pointer produces unintended read

2013-01-25 Thread werner at almesberger dot net


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



--- Comment #7 from werner at almesberger dot net 2013-01-26 02:09:33 UTC ---

I'm happy to confirm that trunk (for x86-64) now passes all variations of this

theme I tried with flying colors. Thanks again !


[Bug c++/67571] New: Error: open CFI at the end of file; missing .cfi_endproc directive

2015-09-14 Thread werner at beroux dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67571

Bug ID: 67571
   Summary: Error: open CFI at the end of file; missing
.cfi_endproc directive
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: werner at beroux dot com
  Target Milestone: ---

gcc (Debian 4.9.2-10) 4.9.2

Steps:

1. Install Docker
2. Retrieve `Dockerfile`: `$ wget
https://raw.githubusercontent.com/wernight/docker-phantomjs/master/Dockerfile`
3. Get latest Debian: `$ docker pull debian:jessie`
3. Run `$ docker build -t phantomjs .`


Log end:

```
g++ -c -Wall -Wextra -Wreturn-type -fno-strict-aliasing -Wchar-subscripts
-Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare
-Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self -pipe
-ffunction-sections -fdata-sections -O2 -fPIC -fvisibility=hidden
-fvisibility-inlines-hidden -std=c++0x -fno-exceptions -D_REENTRANT
-DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_GRAPHICSVIEW
-DQT_NO_GRAPHICSEFFECT -DQT_NO_STYLESHEET -DQT_NO_STYLE_CDE
-DQT_NO_STYLE_CLEANLOOKS -DQT_NO_STYLE_MOTIF -DQT_NO_STYLE_PLASTIQUE
-DSQLITE_CORE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE
-DBUILDING_QT__=1 -DNDEBUG -DENABLE_3D_RENDERING=1 -DENABLE_BLOB=1
-DENABLE_CANVAS_PATH=1 -DENABLE_CHANNEL_MESSAGING=1
-DENABLE_CSS_BOX_DECORATION_BREAK=1 -DENABLE_CSS_COMPOSITING=1
-DENABLE_CSS_EXCLUSIONS=1 -DENABLE_CSS_FILTERS=1 -DENABLE_CSS_IMAGE_SET=1
-DENABLE_CSS_REGIONS=1 -DENABLE_CSS_SHAPES=1 -DENABLE_CSS_STICKY_POSITION=1
-DENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED=1 -DENABLE_DATALIST_ELEMENT=1
-DENABLE_DETAILS_ELEMENT=1 -DENABLE_DOWNLOAD_ATTRIBUTE=1
-DENABLE_FAST_MOBILE_SCROLLING=1 -DENABLE_FILTERS=1 -DENABLE_FTPDIR=1
-DENABLE_FULLSCREEN_API=1 -DENABLE_GESTURE_EVENTS=1 -DENABLE_ICONDATABASE=1
-DENABLE_IFRAME_SEAMLESS=1 -DENABLE_INDEXED_DATABASE=1
-DENABLE_INPUT_TYPE_COLOR=1 -DENABLE_INSPECTOR=1 -DENABLE_INSPECTOR_SERVER=1
-DENABLE_JAVASCRIPT_DEBUGGER=1 -DENABLE_LEGACY_NOTIFICATIONS=1
-DENABLE_LEGACY_VIEWPORT_ADAPTION=1 -DENABLE_LEGACY_VENDOR_PREFIXES=1
-DENABLE_LINK_PREFETCH=1 -DENABLE_METER_ELEMENT=1 -DENABLE_MHTML=1
-DENABLE_NOTIFICATIONS=1 -DENABLE_PAGE_VISIBILITY_API=1
-DENABLE_PROGRESS_ELEMENT=1 -DENABLE_RESOLUTION_MEDIA_QUERY=1
-DENABLE_REQUEST_ANIMATION_FRAME=1 -DENABLE_SHARED_WORKERS=1
-DENABLE_SMOOTH_SCROLLING=1 -DENABLE_SQL_DATABASE=1 -DENABLE_SUBPIXEL_LAYOUT=1
-DENABLE_SVG=1 -DENABLE_SVG_FONTS=1 -DENABLE_TOUCH_ADJUSTMENT=1
-DENABLE_TOUCH_EVENTS=1 -DENABLE_VIEW_MODE_CSS_MEDIA=1 -DENABLE_WEB_SOCKETS=1
-DENABLE_WEB_TIMING=1 -DENABLE_WORKERS=1 -DENABLE_XHR_TIMEOUT=1
-DWTF_USE_TILED_BACKING_STORE=1 -DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1
-DHAVE_QTPRINTSUPPORT=1 -DHAVE_QSTYLE=1 -DWTF_USE_LIBJPEG=1 -DWTF_USE_LIBPNG=1
-DPLUGIN_ARCHITECTURE_UNSUPPORTED=1 -DENABLE_TOUCH_SLIDER=1 -DWTF_USE_LEVELDB=1
-DHAVE_QTTESTSUPPORT=1 -DENABLE_ACCELERATED_2D_CANVAS=0
-DENABLE_BATTERY_STATUS=0 -DENABLE_CANVAS_PROXY=0 -DENABLE_CSP_NEXT=0
-DENABLE_CSS_GRID_LAYOUT=0 -DENABLE_CSS_HIERARCHIES=0
-DENABLE_CSS_IMAGE_ORIENTATION=0 -DENABLE_CSS_IMAGE_RESOLUTION=0
-DENABLE_CSS_SHADERS=0 -DENABLE_CSS_VARIABLES=0
-DENABLE_CSS3_CONDITIONAL_RULES=0 -DENABLE_CSS3_TEXT=0
-DENABLE_CSS3_TEXT_LINE_BREAK=0 -DENABLE_DASHBOARD_SUPPORT=0
-DENABLE_DATAGRID=0 -DENABLE_DATA_TRANSFER_ITEMS=0
-DENABLE_DEVICE_ORIENTATION=0 -DENABLE_DIRECTORY_UPLOAD=0
-DENABLE_FILE_SYSTEM=0 -DENABLE_FONT_LOAD_EVENTS=0 -DENABLE_GAMEPAD=0
-DENABLE_GEOLOCATION=0 -DENABLE_HIGH_DPI_CANVAS=0 -DENABLE_INPUT_SPEECH=0
-DENABLE_INPUT_TYPE_DATE=0 -DENABLE_INPUT_TYPE_DATETIME_INCOMPLETE=0
-DENABLE_INPUT_TYPE_DATETIMELOCAL=0 -DENABLE_INPUT_TYPE_MONTH=0
-DENABLE_INPUT_TYPE_TIME=0 -DENABLE_INPUT_TYPE_WEEK=0
-DENABLE_LEGACY_CSS_VENDOR_PREFIXES=0 -DENABLE_LEGACY_WEB_AUDIO=0
-DENABLE_MATHML=0 -DENABLE_MEDIA_SOURCE=0 -DENABLE_MEDIA_STATISTICS=0
-DENABLE_MEDIA_STREAM=0 -DENABLE_MICRODATA=0 -DENABLE_MOUSE_CURSOR_SCALE=0
-DENABLE_NAVIGATOR_CONTENT_UTILS=0 -DENABLE_NETSCAPE_PLUGIN_API=0
-DENABLE_NETWORK_INFO=0 -DENABLE_NOSNIFF=0 -DENABLE_ORIENTATION_EVENTS=0
-DENABLE_PROXIMITY_EVENTS=0 -DENABLE_QUOTA=0 -DENABLE_RESOURCE_TIMING=0
-DENABLE_SCRIPTED_SPEECH=0 -DENABLE_SECCOMP_FILTERS=0 -DENABLE_SHADOW_DOM=0
-DENABLE_STYLE_SCOPED=0 -DENABLE_TEMPLATE_ELEMENT=0 -DENABLE_TEXT_AUTOSIZING=0
-DENABLE_THREADED_HTML_PARSER=0 -DENABLE_TOUCH_ICON_LOADING=0
-DENABLE_USER_TIMING=0 -DENABLE_VIBRATION=0 -DENABLE_VIDEO=0
-DENABLE_VIDEO_TRACK=0 -DENABLE_WEBGL=0 -DENABLE_WEB_AUDIO=0 -DENABLE_XSLT=0
-DSTATICALLY_LINKED_WITH_leveldb -DSTATICALLY_LINKED_WITH_JavaScriptCore
-DSTATICALLY_LINKED_WITH_WTF -DBUILDING_WebCore -DBUILDING_WEBKIT
-DQT_ASCII_CAST_WARNINGS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE
-D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB
-DQT_CORE_LIB -I/tmp/phantomjs/src/qt/qtbase/mkspecs/linux-g++ -I. -I.
-IModules/filesystem -IModules

[Bug c++/67571] Error: open CFI at the end of file; missing .cfi_endproc directive

2015-09-14 Thread werner at beroux dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67571

--- Comment #2 from werner at beroux dot com ---
It worked on gcc (Debian 4.9.2-2).

Also I tried on two machines with pretty different spec. I'm not excluding the
memory issue, just saying it used to work on those two machines and now it
doesn't.


[Bug c++/67571] Error: open CFI at the end of file; missing .cfi_endproc directive

2015-09-14 Thread werner at beroux dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67571

--- Comment #3 from werner at beroux dot com ---
I should clarify that the code being compiled might have changed as well
between the two:

https://github.com/ariya/phantomjs/commits/master

from 2015-06-25T20:16:02.750261Z (working)
to 2015-09-05T08:36:46.296402Z (started breaking)
and 2015-09-14T07:32:46.758499Z (still breaking)


[Bug c++/67571] Error: open CFI at the end of file; missing .cfi_endproc directive

2015-09-14 Thread werner at beroux dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67571

--- Comment #5 from werner at beroux dot com ---
I'm trying to build with newer GCC and older code to confirm that (build takes
a while).


[Bug c++/67571] Error: open CFI at the end of file; missing .cfi_endproc directive

2015-09-14 Thread werner at beroux dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67571

--- Comment #6 from werner at beroux dot com ---
Humm no sorry I'm building from the same git tag (which is of Jan 24). So it
looks like something caused GCC to use more memory than before.

I did notice a GCC5 compilation fix, probably unrelated, just in case it here:
https://github.com/ariya/phantomjs/commit/fe2c6bb5fdf776b718422a104e6babe67dbf2629


[Bug c++/67571] Error: open CFI at the end of file; missing .cfi_endproc directive

2015-09-15 Thread werner at beroux dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67571

--- Comment #8 from werner at beroux dot com ---
Tried to build the exact same just on newer gcc and nothing else should have
changed, and it failed.

I'll try to build on older gcc as well.


[Bug c++/67571] Error: open CFI at the end of file; missing .cfi_endproc directive

2015-09-16 Thread werner at beroux dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67571

--- Comment #9 from werner at beroux dot com ---
(In reply to Markus Trippelsdorf from comment #7)
> Can you please attach the preprocessed JSBindingsAllInOne.ii file (by
> adding -save-temps to the compiler invocation)?

I added that flag (at least I think it worked) but I find any file of that name
below /tmp/phantomjs (my build directory). Do you know where it's supposed to
be generated at?


[Bug c++/67571] Error: open CFI at the end of file; missing .cfi_endproc directive

2015-09-16 Thread werner at beroux dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67571

--- Comment #11 from werner at beroux dot com ---
(In reply to Markus Trippelsdorf from comment #10)
> (In reply to werner from comment #9)
> > (In reply to Markus Trippelsdorf from comment #7)
> > > Can you please attach the preprocessed JSBindingsAllInOne.ii file (by
> > > adding -save-temps to the compiler invocation)?
> > 
> > I added that flag (at least I think it worked) but I find any file of that
> > name below /tmp/phantomjs (my build directory). Do you know where it's
> > supposed to be generated at?
> 
> In the directory from which you've invoked gcc.
> 
> So in your case:
> cd /tmp/phantomjs/src/qt/qtwebkit/Source/WebCore
> g++ --save-temps -c  -Wall -Wextra -Wreturn-type ... (from comment 0)
> 
> You'll find JSBindingsAllInOne.ii in
> /tmp/phantomjs/src/qt/qtwebkit/Source/WebCore

It's odd, I get another error with -save-temps (correctly passed this time):

> g++: warning: -pipe ignored because -save-temps specified
> In file included from :0:0:
> /usr/include/stdc-predef.h:59:1: error: one or more PCH files were found, but 
> they were invalid
>  #endif
>  ^
> /usr/include/stdc-predef.h:59:1: error: use -Winvalid-pch for more information
> /usr/include/stdc-predef.h:59:1: fatal error: .pch/Qt5Core: No such file or 
> directory
> compilation terminated.
> Makefile:18187: recipe for target '.obj/harfbuzz-shaper-all.o' failed
> make[2]: *** [.obj/harfbuzz-shaper-all.o] Error 1
> make[2]: *** Waiting for unfinished jobs
> In file included from :0:0:
> /usr/include/stdc-predef.h:59:1: error: one or more PCH files were found, but 
> they were invalid
>  #endif
>  ^
> /usr/include/stdc-predef.h:59:1: error: use -Winvalid-pch for more information
> /usr/include/stdc-predef.h:59:1: fatal error: .pch/Qt5Core: No such file or 
> directory
> compilation terminated.
> Makefile:18301: recipe for target '.obj/qharfbuzz.o' failed
> make[2]: *** [.obj/qharfbuzz.o] Error 1
> In file included from ../3rdparty/pcre/pcre16_exec.c:43:0:
> ../3rdparty/pcre/pcre_exec.c: In function 'match':
> ../3rdparty/pcre/pcre_exec.c:2703:35: warning: 'offset' may be used 
> uninitialized in this function [-Wmaybe-uninitialized]
>  length = md->offset_vector[offset+1] - md->offset_vector[offset];
>^
> In file included from ../3rdparty/pcre/pcre16_compile.c:43:0:
> ../3rdparty/pcre/pcre_compile.c: In function 'compile_regex':
> ../3rdparty/pcre/pcre_compile.c:6748:31: warning: 'name' may be used 
> uninitialized in this function [-Wmaybe-uninitialized]
>  if (!IS_DIGIT(name[i]))
>^
> ../3rdparty/pcre/pcre_compile.c:6511:25: note: 'name' was declared here
>const pcre_uchar *name;
>  ^
> ../3rdparty/pcre/pcre_compile.c:6509:26: warning: 'namelen' may be used 
> uninitialized in this function [-Wmaybe-uninitialized]
>int i, set, unset, namelen;
>   ^
> ../3rdparty/pcre/pcre_compile.c:6680:26: warning: 'recno' may be used 
> uninitialized in this function [-Wmaybe-uninitialized]
>  cd->bracount - recno + 1 : recno + cd->bracount;
>   ^
> ../3rdparty/pcre/pcre_compile.c:4453:7: note: 'recno' was declared here
>int recno;
>^
> make[2]: Leaving directory '/tmp/phantomjs/src/qt/qtbase/src/corelib'
> Makefile:130: recipe for target 'sub-corelib-make_first' failed
> make[1]: *** [sub-corelib-make_first] Error 2
> make[1]: Leaving directory '/tmp/phantomjs/src/qt/qtbase/src'
> Makefile:39: recipe for target 'sub-src-make_first' failed
> make: *** [sub-src-make_first] Error 2


[Bug c++/28677] New: Function prototype in function body crashes compilation

2006-08-10 Thread werner dot van dot belle at gmail dot com
[EMAIL PROTECTED]:~$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20060729 (prerelease) (Debian 4.1.1-10)

I currently use the latest Debian unstable system.

[EMAIL PROTECTED] g++ -O3 -g crasher.cpp
crasher.cpp: In function 'float betai(float, float, float)':
crasher.cpp:43: internal compiler error: in add_AT_specification, at
dwarf2out.c:5048
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see .
Preprocessed source stored into /tmp/ccH8vLQj.out file, please attach this to
your bugreport.

the preprocessed source will be attached.


-- 
   Summary: Function prototype in function body crashes compilation
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: werner dot van dot belle at gmail dot com


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



[Bug c++/28677] Function prototype in function body crashes compilation

2006-08-10 Thread werner dot van dot belle at gmail dot com


--- Comment #1 from werner dot van dot belle at gmail dot com  2006-08-10 
12:20 ---
Created an attachment (id=12057)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12057&action=view)
The preprocessed source


-- 


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



[Bug c++/28677] Function prototype in function body crashes compilation

2006-08-10 Thread werner dot van dot belle at gmail dot com


--- Comment #2 from werner dot van dot belle at gmail dot com  2006-08-10 
12:25 ---
The bug does not occur without the -g option.


-- 


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