[Bug target/55431] Invalid auxv search in ppc linux-unwind code.

2013-02-11 Thread aldot at gcc dot gnu.org


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



Bernhard Reutner-Fischer  changed:



   What|Removed |Added



 CC||aldot at gcc dot gnu.org,

   ||dje.gcc at gmail dot com,

   ||geoffk at geoffk dot org



--- Comment #3 from Bernhard Reutner-Fischer  
2013-02-11 09:12:11 UTC ---

CCing rs6000 maintainers


[Bug middle-end/36282] Spurious warning "asm declaration ignored due to conflict with previous rename"

2013-03-21 Thread aldot at gcc dot gnu.org

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

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-03-21
 CC||aldot at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #3 from Bernhard Reutner-Fischer  
2013-03-21 18:21:00 UTC ---
Confirmed.

Still the same with gcc version 4.7.2 (Debian 4.7.2-5):
$ cat <:2:14: warning: conflicting types for built-in function ‘memcpy’
[enabled by default]
:3:1: warning: asm declaration ignored due to conflict with previous
rename [-Wpragmas]

[Bug middle-end/36282] Spurious warning "asm declaration ignored due to conflict with previous rename"

2013-03-22 Thread aldot at gcc dot gnu.org

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

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||hubicka at ucw dot cz

--- Comment #4 from Bernhard Reutner-Fischer  
2013-03-22 12:59:10 UTC ---
(In reply to comment #3)
> Confirmed.
> 
> Still the same with gcc version 4.7.2 (Debian 4.7.2-5):
> $ cat < #pragma weak __pthread_initialize
> extern void *memcpy(void *dest, const void *src, int n);
> extern typeof(memcpy) memcpy asm("__GI_memcpy");
> EOF
> :2:14: warning: conflicting types for built-in function ‘memcpy’
> [enabled by default]
> :3:1: warning: asm declaration ignored due to conflict with previous
> rename [-Wpragmas]

Works as expected if one provides a decl before the #pragma:

$ cat <:4:1: warning: asm declaration ignored due to conflict with previous
rename [-Wpragmas]

Honza, does that ring a bell, by chance?

[Bug middle-end/36282] [4.7/4.8/4.9 Regression] Spurious warning "asm declaration ignored due to conflict with previous rename"

2013-03-22 Thread aldot at gcc dot gnu.org


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



Bernhard Reutner-Fischer  changed:



   What|Removed |Added



  Known to work||3.4.6

Summary|Spurious warning "asm   |[4.7/4.8/4.9 Regression]

   |declaration ignored due to  |Spurious warning "asm

   |conflict with previous  |declaration ignored due to

   |rename" |conflict with previous

   ||rename"

  Known to fail||4.7.2, 4.8.0



--- Comment #5 from Bernhard Reutner-Fischer  
2013-03-22 13:06:47 UTC ---

$ gcc-3.4 -fno-exceptions -fomit-frame-pointer -fno-builtin -S pr36282.c -o

ok.s

$ gcc-4.7 -fno-exceptions -fomit-frame-pointer -fno-builtin -S pr36282.c -o

nak.s

pr36282.c:3:1: warning: asm declaration ignored due to conflict with previous

rename [-Wpragmas]



$ cat pr36282.c 

#pragma weak __pthread_initialize

extern void *memcpy(void *dest, const void *src, int n);

extern typeof(memcpy) memcpy asm("__GI_memcpy");

char *usr(void) {

char ch[2];

return memcpy(&ch, "x", 2);

}

$ cat ok.s

.file"pr36282.c"

.section.rodata

.LC0:

.string"x"

.text

.globl usr

.typeusr, @function

usr:

.LFB2:

subq$24, %rsp

.LCFI0:

movq%rsp, %rdi

movl$2, %edx

movl$.LC0, %esi

call__GI_memcpy

addq$24, %rsp

ret

.LFE2:

.sizeusr, .-usr

.section.eh_frame,"a",@progbits

.Lframe1:

.long.LECIE1-.LSCIE1

.LSCIE1:

.long0x0

.byte0x1

.string""

.uleb128 0x1

.sleb128 -8

.byte0x10

.byte0xc

.uleb128 0x7

.uleb128 0x8

.byte0x90

.uleb128 0x1

.align 8

.LECIE1:

.LSFDE1:

.long.LEFDE1-.LASFDE1

.LASFDE1:

.long.LASFDE1-.Lframe1

.quad.LFB2

.quad.LFE2-.LFB2

.byte0x4

.long.LCFI0-.LFB2

.byte0xe

.uleb128 0x20

.align 8

.LEFDE1:

.section.note.GNU-stack,"",@progbits

.ident"GCC: (GNU) 3.4.6 (Debian 3.4.6-10)"



$ cat nak.s

.file"pr36282.c"

.section.rodata

.LC0:

.string"x"

.text

.globlusr

.typeusr, @function

usr:

.LFB0:

.cfi_startproc

subq$24, %rsp

.cfi_def_cfa_offset 32

movq%rsp, %rax

movl$2, %edx

movl$.LC0, %esi

movq%rax, %rdi

callmemcpy

addq$24, %rsp

.cfi_def_cfa_offset 8

ret

.cfi_endproc

.LFE0:

.sizeusr, .-usr

.ident"GCC: (Debian 4.7.2-5) 4.7.2"

.section.note.GNU-stack,"",@progbits


[Bug target/56716] during gcc 4.8.0 build on Cygwin: bid128_fma.c:4460:1: internal compiler error: Segmentation fault

2013-03-27 Thread aldot at gcc dot gnu.org

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

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Target|i686-pc-cygwin  |i686-pc-cygwin,
   ||x86_64-unknown-linux-gnu
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-03-27
 CC||aldot at gcc dot gnu.org
 Ever Confirmed|0   |1
  Known to fail||4.9.0

--- Comment #1 from Bernhard Reutner-Fischer  
2013-03-27 12:43:23 UTC ---
same thing on current trunk @ targeting x86_64-unknown-linux-gnu:

$ /scratch/obj.x86_64/gcc-4.9.orig/./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/scratch/obj.x86_64/gcc-4.9.orig/./gcc/xgcc
Target: x86_64-unknown-linux-gnu
Configured with: ../../src/gcc-4.9.orig/configure -v
--enable-languages=c,lto,fortran,c++,go LD=ld CFLAGS='-O2 -g3 -ggdb3
-fdump-ipa-all-all-all -fdump-tree-all-all-all -fdump-rtl-all-all'
CXXFLAGS='-O2 -g3 -ggdb3 -fdump-ipa-all-all-all -fdump-tree-all-all-all
-fdump-rtl-all-all' 'BOOT_CFLAGS=-O2 ' 'BOOT_CXXFLAGS=-O2 '
'CFLAGS_FOR_TARGET=-Og -g3 -ggdb3 -fdump-ipa-all-all-all
-fdump-tree-all-all-all -fdump-rtl-all-all' 'CXXFLAGS_FOR_TARGET=-Og -g3 -ggdb3
-fdump-ipa-all-all-all -fdump-tree-all-all-all -fdump-rtl-all-all' --prefix=/
--enable-shared --with-system-zlib --enable-nls --without-included-gettext
--enable-threads=posix --program-suffix=-4.9.orig-HEAD
--with-build-config='bootstrap-asan bootstrap-lto' --enable-__cxa_atexit
--enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --disable-werror --enable-checking=yes --enable-debug -C
--disable-intermodule --disable-libstdcxx-pch --disable-multilib
--enable-bootstrap --enable-checking=release --with-cpu=native
--with-tune=native --enable-plugin
Thread model: posix
gcc version 4.9.0 20130327 (experimental) [fixups revision
2e9f00a:a9591cc:d18af62e3808d9860cf2a36c41367b3b3e8e3fa9] (GCC)

/scratch/obj.x86_64/gcc-4.9.orig/./gcc/xgcc
-B/scratch/obj.x86_64/gcc-4.9.orig/./gcc/ -B//x86_64-unknown-linux-gnu/bin/
-B//x86_64-unknown-linux-gnu/lib/ -isystem //x86_64-unknown-linux-gnu/include
-isystem //x86_64-unknown-linux-gnu/sys-include-Og -g3 -ggdb3
-fdump-ipa-all-all-all -fdump-tree-all-all-all -fdump-rtl-all-all -O2  -Og -g3
-ggdb3 -fdump-ipa-all-all-all -fdump-tree-all-all-all -fdump-rtl-all-all
-DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include   -fpic -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector   -fpic -mlong-double-80 -I. -I. -I../.././gcc
-I../../../../src/gcc-4.9.orig/libgcc -I../../../../src/gcc-4.9.orig/libgcc/.
-I../../../../src/gcc-4.9.orig/libgcc/../gcc
-I../../../../src/gcc-4.9.orig/libgcc/../include
-I../../../../src/gcc-4.9.orig/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT
-DHAVE_CC_TLS  -DUSE_TLS -o bid128_fma.o -MT bid128_fma.o -MD -MP -MF
bid128_fma.dep -c
../../../../src/gcc-4.9.orig/libgcc/config/libbid/bid128_fma.c
../../../../src/gcc-4.9.orig/libgcc/config/libbid/bid128_fma.c: In function
‘add_and_round’:
../../../../src/gcc-4.9.orig/libgcc/config/libbid/bid128_fma.c:4460:1: internal
compiler error: Segmentation fault
 }
 ^
0x9d8a50 crash_signal
../../../src/gcc-4.9.orig/gcc/toplev.c:332
0xb2572d perform_var_substitution
../../../src/gcc-4.9.orig/gcc/tree-ssa-structalias.c:2299
0xb2f97b solve_constraints
../../../src/gcc-4.9.orig/gcc/tree-ssa-structalias.c:6659
0xb2fd7b compute_points_to_sets
../../../src/gcc-4.9.orig/gcc/tree-ssa-structalias.c:6755
0xb30460 compute_may_aliases()
../../../src/gcc-4.9.orig/gcc/tree-ssa-structalias.c:6905
0x8fb395 execute_function_todo
../../../src/gcc-4.9.orig/gcc/passes.c:1941
0x8fa7b9 do_per_function
../../../src/gcc-4.9.orig/gcc/passes.c:1701
0x8fb444 execute_todo
../../../src/gcc-4.9.orig/gcc/passes.c:1996
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [bid128_fma.o] Error 1
make[3]: Leaving directory
`/scratch/obj.x86_64/gcc-4.9.orig/x86_64-unknown-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2

[Bug sanitizer/56781] New: boostrap-asan failure: fixincl fails to link (missing -lasan)

2013-03-29 Thread aldot at gcc dot gnu.org


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



 Bug #: 56781

   Summary: boostrap-asan failure: fixincl fails to link (missing

-lasan)

Classification: Unclassified

   Product: gcc

   Version: 4.9.0

Status: UNCONFIRMED

  Keywords: build

  Severity: normal

  Priority: P3

 Component: sanitizer

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

ReportedBy: al...@gcc.gnu.org

CC: do...@gcc.gnu.org, dvyu...@gcc.gnu.org,

ja...@gcc.gnu.org, k...@gcc.gnu.org





bootstrap on x86_64-linux-gnu fails with:



/scratch/obj.x86_64/gcc-4.9.mine/./gcc/xgcc

-B/scratch/obj.x86_64/gcc-4.9.mine/./gcc/

-B/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/bin/

-B/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/lib/ -isystem

/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/include -isystem

/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/sys-include-Og -g3 -ggdb3

-static-libstdc++ -static-libgcc  -o fixincl fixincl.o fixtests.o fixfixes.o

server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a 

../libiberty/libiberty.a(regex.o): In function `byte_compile_range':

/scratch/obj.x86_64/gcc-4.9.mine/libiberty/../../../src/gcc-4.9.mine/libiberty/regex.c:4499:

undefined reference to `__asan_report_store1'

/scratch/obj.x86_64/gcc-4.9.mine/libiberty/../../../src/gcc-4.9.mine/libiberty/regex.c:4499:

undefined reference to `__asan_report_load1'

[snip]



we would obviously need to link against asan but it is not immediately obvious

to me how to pass POSTSTAGE1_LDFLAGS to fixincludes/



$ /scratch/obj.x86_64/gcc-4.9.mine/./gcc/xgcc

-B/scratch/obj.x86_64/gcc-4.9.mine/./gcc/

-B/scratch/obj.x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/libsanitizer/asan

-B/scratch/obj.x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/libsanitizer/asan/.libs

-B/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/bin/

-B/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/lib/ -isystem

/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/include -isystem

/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/sys-include-Og -g3 -ggdb3

-static-libstdc++ -static-libgcc  -o fixincl fixincl.o fixtests.o fixfixes.o

server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a

-fsanitize=address -static-libasan

produces the desired fixincl



$ /scratch/obj.x86_64/gcc-4.9.mine/./gcc/xgcc -v

Using built-in specs.

COLLECT_GCC=/scratch/obj.x86_64/gcc-4.9.mine/./gcc/xgcc

Target: x86_64-unknown-linux-gnu

Configured with: ../../src/gcc-4.9.mine/configure -v

--enable-languages=c,lto,fortran,c++,go LD=/usr/bin/ld.bfd CFLAGS='-O2 -g3

-ggdb3' CXXFLAGS='-O2 -g3 -ggdb3' 'BOOT_CFLAGS=-O2 -g3 -ggdb3'

'BOOT_CXXFLAGS=-O2 -g3 -ggdb3' 'CFLAGS_FOR_TARGET=-Og -g3 -ggdb3'

'CXXFLAGS_FOR_TARGET=-Og -g3 -ggdb3' --prefix=/opt/x86_64/gcc-4.9.mine//

--enable-shared --with-system-zlib --enable-nls --without-included-gettext

--enable-threads=posix --program-suffix=-4.9.mine-HEAD

--with-build-config=bootstrap-asan --enable-__cxa_atexit

--enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug

--enable-mpfr --disable-werror --enable-checking=yes --enable-debug -C

--disable-intermodule --enable-multilib --disable-libstdcxx-pch

--enable-bootstrap --enable-checking=release --with-cpu=native

--with-tune=native --enable-plugin

Thread model: posix

gcc version 4.9.0 20130327 (experimental) [vnhoist revision

32ddde1:a851c38:065ec6e627efa59b32f9fb743368a4a55c4ac310] (GCC)


[Bug sanitizer/56781] boostrap-asan failure: fixincl fails to link (missing -lasan)

2013-04-04 Thread aldot at gcc dot gnu.org


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



--- Comment #2 from Bernhard Reutner-Fischer  
2013-04-04 11:41:08 UTC ---

(In reply to comment #1)

> Please try

> 

> http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=61be6ebfe22f9ce5799dac2679541911eb744a86

> http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=6b526a34a0bc852461cb50636c6e757bf8e27faf



I don't think that the above is the correct thing to do;

Shouldn't the post-stage1 libs be built with and linked against asan?

Like (i know that this is a generated file) below which reinstates bootstrap:



diff --git a/Makefile.in b/Makefile.in

index 08049de..52249a0 100644

--- a/Makefile.in

+++ b/Makefile.in

@@ -7786,7 +7786,7 @@ configure-fixincludes:

s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \

test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; \

$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes ; \

-   $(HOST_EXPORTS)  \

+   $(POSTSTAGE1_HOST_EXPORTS)  \

echo Configuring in $(HOST_SUBDIR)/fixincludes; \

cd "$(HOST_SUBDIR)/fixincludes" || exit 1; \

case $(srcdir) in \

@@ -7818,7 +7818,7 @@ all-fixincludes: configure-fixincludes

@: $(MAKE); $(unstage)

@r=`${PWD_COMMAND}`; export r; \

s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \

-   $(HOST_EXPORTS)  \

+   $(POSTSTAGE1_HOST_EXPORTS)  \

(cd $(HOST_SUBDIR)/fixincludes && \

  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)

$(STAGE1_FLAGS_TO_PASS)  \

$(TARGET-fixincludes))

@@ -7836,7 +7836,7 @@ check-fixincludes:

@: $(MAKE); $(unstage)

@r=`${PWD_COMMAND}`; export r; \

s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \

-   $(HOST_EXPORTS) \

+   $(POSTSTAGE1_HOST_EXPORTS) \

(cd $(HOST_SUBDIR)/fixincludes && \

  $(MAKE) $(FLAGS_TO_PASS)  check)



@@ -7851,7 +7851,7 @@ install-fixincludes: installdirs

@: $(MAKE); $(unstage)

@r=`${PWD_COMMAND}`; export r; \

s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \

-   $(HOST_EXPORTS) \

+   $(POSTSTAGE1_HOST_EXPORTS) \

(cd $(HOST_SUBDIR)/fixincludes && \

  $(MAKE) $(FLAGS_TO_PASS)  install)



@@ -7866,7 +7866,7 @@ install-strip-fixincludes: installdirs

@: $(MAKE); $(unstage)

@r=`${PWD_COMMAND}`; export r; \

s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \

-   $(HOST_EXPORTS) \

+   $(POSTSTAGE1_HOST_EXPORTS) \

(cd $(HOST_SUBDIR)/fixincludes && \

  $(MAKE) $(FLAGS_TO_PASS)  install-strip)


[Bug target/56716] during gcc 4.8.0 build on Cygwin: bid128_fma.c:4460:1: internal compiler error: Segmentation fault

2013-04-27 Thread aldot at gcc dot gnu.org


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



Bernhard Reutner-Fischer  changed:



   What|Removed |Added



 CC|aldot at gcc dot gnu.org|



--- Comment #9 from Bernhard Reutner-Fischer  
2013-04-27 22:35:02 UTC ---

b internal_error

run

bt


[Bug lto/47577] New: [lto]: does not recognize/unify identical .macro

2011-02-01 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47577

   Summary: [lto]: does not recognize/unify identical .macro
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: al...@gcc.gnu.org


Fails with: -flto on
gcc-4.6.0-trunk@169467
GNU assembler (GNU Binutils for Debian) 2.20.1-system.20100303
GNU assembler (GNU Binutils) 2.21.51.20110131
(1da8c83863b4fe3db654d0bb35b46a38069c4c97)

---8<--- one.c ---8<---
__asm__(
#ifdef __IMA__
".ifndef __GUARD\n\t"
".set __GUARD,1\n\t"
#endif
".macro mmm arg1 arg2\n\t"
".if 1 - \\arg1\n\t"
"nop\n\t"
".endif\n\t"
".endm\n\t"
#ifdef __IMA__
".endif\n\t"
#endif
   );
#ifndef __MAIN
#define __MAIN
int main(void){return 0;}
#endif
---8<--- two.c ---8<---
#define __MAIN
#include "one.c"
$ gcc-4.6.orig-HEAD one.c two.c  -o o
$ gcc-4.6.orig-HEAD one.c two.c  -o o -flto
/tmp/ccSk75A8.s: Assembler messages:
/tmp/ccSk75A8.s:28: Error: Macro `mmm' was already defined
lto-wrapper: gcc-4.6.orig-HEAD returned 1 exit status
collect2: lto-wrapper returned 1 exit status
$ gcc-4.6.orig-HEAD one.c two.c  -o o -flto -D__IMA__
$ 

The .macro in all TUs is identical, shouldn't only one be passed to the
assembler?


[Bug lto/47578] New: [lto]: handle TS_OPTIMIZE in stream reader/writer

2011-02-01 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47578

   Summary: [lto]: handle TS_OPTIMIZE in stream reader/writer
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: lto
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: al...@gcc.gnu.org


Created attachment 23202
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23202
remove 2 sorry()

echo 'int __attribute__ ((optimize("Os"))) foo(int inp){return inp&42;}' |
gcc-4.6-HEAD -xc -c -o pity.o -flto - ; echo $?
:1:1: sorry, unimplemented: gimple bytecode streams do not support the
optimization attribute
1

With attached patch:

$ echo 'int __attribute__ ((optimize("Os"))) foo(int inp){return inp&42;}' |
i686-oe-linux-uclibc-gcc -xc -c -o os.o -flto - ; echo $?
0


[Bug lto/45475] target use in libcpp breaks LTO bootstrap

2011-02-01 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45475

--- Comment #11 from Bernhard Reutner-Fischer  
2011-02-01 19:44:13 UTC ---
(In reply to comment #10)
> *** Bug 47578 has been marked as a duplicate of this bug. ***

bug 47578 above stumbled across TS_OPTIMIZE. Quote from proposed patch there:
DECL_FUNCTION_SPECIFIC_OPTIMIZATION is already handled in
lto_input_ts_function_decl_tree_pointers and
lto_output_ts_function_decl_tree_pointers, respectively. So, under the
assumption that TS_OPTIMIZE means function-specific-opts and as such only ever
applies to fn-decls, remove the redundant sorry().

gcc/ChangeLog:

2010-02-01  Bernhard Reutner-Fischer  

* lto-streamer-in.c (lto_input_tree_pointers): Do not handle
  TS_OPTIMIZATION.
* lto-streamer-out.c (lto_output_tree_pointers): Ditto.


[Bug c/18624] GCC does not detect local variable set but never used

2011-08-24 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18624

--- Comment #27 from Bernhard Reutner-Fischer  
2011-08-24 17:14:19 UTC ---
FIXED? Seems that this is supported in c++ nowadays, thanks to dodji.


[Bug c/50179] New: wrong "set but not used" warning

2011-08-24 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50179

 Bug #: 50179
   Summary: wrong "set but not used" warning
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: al...@gcc.gnu.org


To me it looks like the warning below is not correct. The variable is in fact
used.

$ gcc-4.6 -c -o bug.o bug.c -Wall
bug.c: In function ‘huh’:
bug.c:5:15: warning: variable ‘b__’ set but not used
[-Wunused-but-set-variable]
$ cat bug.c
#include 
void huh(void) {
printf("%s", (__extension__(
{
static char b__[129];
b__[0] = 1;
b__[1] = 2;
b__[2] = 0;
b__;
}))
);
}


[Bug libstdc++/50573] New: configure lists --with-gnu-ld twice

2011-09-30 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50573

 Bug #: 50573
   Summary: configure lists --with-gnu-ld twice
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: al...@gcc.gnu.org


on trunk i see:
$ grep "^[[:space:]]*\-\-with-gnu-ld" libstdc++-v3/configure
  --with-gnu-ld   assume the C compiler uses GNU ld [default=no]
  --with-gnu-ld   assume the C compiler uses GNU ld default=no


[Bug libstdc++/50573] configure lists --with-gnu-ld twice

2011-09-30 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50573

--- Comment #1 from Bernhard Reutner-Fischer  
2011-09-30 09:02:18 UTC ---
btw.. same thing with java configury and three(!) times in gcc/configure:

$ grep -c "^[[:space:]]*\-\-with-gnu-ld" */configure  | egrep -v "(0|1)$"
gcc/configure:3
libjava/configure:2
libstdc++-v3/configure:2


[Bug target/40657] allocate local variables with fewer instructions

2012-06-20 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40657

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org

--- Comment #12 from Bernhard Reutner-Fischer  
2012-06-20 18:24:29 UTC ---
Fixed?


$ arm-oe-linux-uclibceabi-gcc -Os -mthumb -march=armv5te -S pr40657.c -o -
.arch armv5te
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 4
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.code16
.file"pr40657.c"
.text
.align1
.globalfoo
.code16
.thumb_func
.typefoo, %function
foo:
push{r0, r1, r2, lr}
addr0, sp, #4
blbar
@ sp needed for prologue
ldrr0, [sp, #4]
pop{r1, r2, r3, pc}
.sizefoo, .-foo
.ident"GCC: (GNU) 4.7.1 20120421 (prerelease)"
.section.note.GNU-stack,"",%progbits


[Bug target/53735] New: thumb1 spill failure with -Os

2012-06-20 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53735

 Bug #: 53735
   Summary: thumb1 spill failure with -Os
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Keywords: assemble-failure, ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: al...@gcc.gnu.org
CC: ram...@gcc.gnu.org, rearn...@gcc.gnu.org
Target: arm-eabi


Created attachment 27667
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27667
original source

fork() fails to assemble with -mthumb -Os, works with -O2 instead of -Os.

arm-oe-linux-uclibceabi-gcc -S fork.i -o fork.s -mthumb -Os ;# -g
-march=armv5te -mthumb-interwork -mtune=arm926ej-s -msoft-float -mlittle-endian
-feliminate-unused-debug-types -fno-tree-loop-optimize -fno-tree-dominator-opts 
fork.i: In function 'fork':
fork.i:8762:1: error: unable to find a register to spill in class 'LO_REGS'
fork.i:8762:1: error: this is the insn:
(insn 99 97 100 17 (set (reg/v:SI 4 r4 [ _v1 ])
(plus:SI (reg/f:SI 147 [ D.8653 ])
(const_int -1064 [0xfbd8])))
fork.i:8727 5 {*thumb1_addsi3}
 (nil))
fork.i:8762: confused by earlier errors, bailing out


Attached fork.i is the original, fork-reduced.i is a slightly reduced variant.
Above my original flags commented out for reference.


[Bug target/53735] thumb1 spill failure with -Os

2012-06-20 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53735

--- Comment #1 from Bernhard Reutner-Fischer  
2012-06-20 18:58:06 UTC ---
Created attachment 27668
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27668
reduced source


[Bug target/32219] optimizer causes wrong code in pic/hidden/weak symbol checking.

2012-06-28 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32219

--- Comment #13 from Bernhard Reutner-Fischer  
2012-06-28 22:49:52 UTC ---
Created attachment 27716
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27716
testcase

This was (accidentally) fixed on for at least 4.7 ff but without adding a
testcase like the attached.


[Bug target/30354] -Os doesn't optimize a/CONST even if it saves size.

2012-06-28 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30354

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

   Keywords||missed-optimization
   Last reconfirmed|2009-06-30 13:36:11 |2012-06-29
   Host|i386-pc-linux-gnu   |
  Build|i386-pc-linux-gnu   |

--- Comment #15 from Bernhard Reutner-Fischer  
2012-06-28 23:28:28 UTC ---
Honza, did you find time to have a look?

I think this regressed alot in 4.6

$ for i in 3.4 4.2 4.4 4.5 4.6 4.7 4.8;do gcc-$i -fomit-frame-pointer -m32 -Os
-o t-$i.o -c t.c;done
$ size t-*.o
   text   databssdechexfilename
 254731  0  0 254731  3e30bt-3.4.o
 257731  0  0 257731  3eec3t-4.2.o
 242787  0  0 242787  3b463t-4.4.o
 242787  0  0 242787  3b463t-4.5.o
 542811  0  0 542811  8485bt-4.6.o
 542811  0  0 542811  8485bt-4.7.o
 542811  0  0 542811  8485bt-4.8.o

where:
gcc version 3.4.6 (Debian 3.4.6-10)
gcc version 4.2.4 (Debian 4.2.4-6)
gcc version 4.4.7 (Debian 4.4.7-1) 
gcc version 4.5.3 (Debian 4.5.3-12) 
gcc version 4.6.3 (Debian 4.6.3-1) 
gcc version 4.7.1 (Debian 4.7.1-2)
4.8 was pristine (just unrelated fixups)
gcc version 4.8.0 20120514 (experimental) [fixups revision
19d3eef:c8f5cfb:cbf2756acd7df8cfb441025e4512b97b6ef2fd10] (GCC)


[Bug target/53803] New: --enable-target-optspace gives undefined references to restgpr_*_x

2012-06-29 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53803

 Bug #: 53803
   Summary: --enable-target-optspace gives undefined references to
restgpr_*_x
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: al...@gcc.gnu.org
CC: dje@gmail.com, froy...@gcc.gnu.org,
geo...@geoffk.org
Target: powerpc


intermediate compiler (built with -Os) trying to link a userspace program gives

powerpc-oe-linux-uclibc-gcc -m32 -mhard-float -mcpu=603e
powerpc-oe-linux-uclibc/4.7.1/ld: getconf: hidden symbol `_restgpr_31_x' in 
/scratch/obj.x86_64/oe/build/tmp-uclibc/sysroots/x86_64-linux/usr/lib/ppc603e-oe-linux-uclibc.gcc-cross-intermediate/gcc/powerpc-oe-linux-uclibc/4.7.1/libgcc.a(crtresxgpr.o)
is referenced by DSO

Observations:
1) libgcc_s.so is a script: "GROUP ( libgcc_s.so.1 libgcc.a )"
2) There are libcalls emitted into my libc:
$ powerpc-oe-linux-uclibc-gcc  -m32 -mhard-float  -mcpu=603e
--sysroot=/scratch/obj.x86_64/oe/build/tmp-uclibc/sysroots/qemuppc-tcbootstrap
-Wl,-EB -shared -Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc -Wl,-z,relro
-Wl,-z,now -Wl,--hash-style=gnu -Wl,-z,defs   -Wl,-init,__uClibc_init 
-Wl,-soname=libc.so.0 -nostdlib -o lib/libuClibc-0.9.34-git.so 
-Wl,--whole-archive libc/libc_so.a -Wl,--no-whole-archive ./lib/interp.os
./lib/ld-uClibc.so.0 ./lib/uclibc_nonshared.a 2>&1 >&1 | sed -e
's/.*uClibc/OBJTREE/'
libc/libc_so.a(fnmatch.os): In function `end_pattern':
OBJTREE/libc/misc/fnmatch/fnmatch_loop.c:1014: undefined reference to
`_restgpr_27_x'
libc/libc_so.a(fnmatch.os): In function `internal_fnmatch':
OBJTREE/libc/misc/fnmatch/fnmatch_loop.c:975: undefined reference to
`_restgpr_16_x'
libc/libc_so.a(fnmatch.os): In function `ext_match':
OBJTREE/libc/misc/fnmatch/fnmatch_loop.c:1189: undefined reference to
`_restgpr_14_x'
libc/libc_so.a(regex.os): In function `postorder':
OBJTREE/libc/misc/regex/regcomp.c:1167: undefined reference to `_restgpr_28_x'
libc/libc_so.a(regex.os): In function `check_dst_limits_calc_pos_1':
OBJTREE/libc/misc/regex/regexec.c:1914: undefined reference to `_restgpr_18_x'
libc/libc_so.a(regex.os): In function `re_node_set_alloc':
OBJTREE/libc/misc/regex/regex_internal.c:885: undefined reference to
`_restgpr_29_x'
libc/libc_so.a(regex.os): In function `duplicate_tree':
OBJTREE/libc/misc/regex/regcomp.c:3779: undefined reference to `_restgpr_26_x'
libc/libc_so.a(regex.os): In function `lower_subexp':
OBJTREE/libc/misc/regex/regcomp.c:1288: undefined reference to `_restgpr_24_x'
libc/libc_so.a(regex.os): In function `free_state':
OBJTREE/libc/misc/regex/regex_internal.c:1499: undefined reference to
`_savegpr_31'
libc/libc_so.a(regex.os): In function `re_string_destruct':
OBJTREE/libc/misc/regex/regex_internal.c:828: undefined reference to
`_restgpr_31_x'
libc/libc_so.a(regex.os): In function `re_dfa_add_node':
OBJTREE/libc/misc/regex/regex_internal.c:1360: undefined reference to
`_restgpr_22_x'
libc/libc_so.a(regex.os): In function `build_wcs_buffer':
OBJTREE/libc/misc/regex/regex_internal.c:257: undefined reference to
`_restgpr_23_x'
libc/libc_so.a(regex.os): In function `build_wcs_upper_buffer':
OBJTREE/libc/misc/regex/regex_internal.c:473: undefined reference to
`_restgpr_21_x'
libc/libc_so.a(regex.os): In function `re_compile_fastmap_iter':
OBJTREE/libc/misc/regex/regcomp.c:397: undefined reference to `_restgpr_17_x'
libc/libc_so.a(regex.os): In function `re_node_set_init_union':
OBJTREE/libc/misc/regex/regex_internal.c:1096: undefined reference to
`_restgpr_25_x'
libc/libc_so.a(regex.os): In function `sift_states_backward':
OBJTREE/libc/misc/regex/regexec.c:1561: undefined reference to `_restgpr_15_x'
libc/libc_so.a(regex.os): In function `expand_bkref_cache':
OBJTREE/libc/misc/regex/regexec.c:3212: undefined reference to `_restgpr_20_x'
libc/libc_so.a(regex.os): In function `re_compile_pattern':
OBJTREE/libc/misc/regex/regcomp.c:233: undefined reference to `_restgpr_30_x'
libc/libc_so.a(wordexp.os): In function `parse_arith':
OBJTREE/libc/misc/wordexp/wordexp.c:751: undefined reference to `_restgpr_19_x'
libc/libc_so.a(_fpmaxtostr.os): In function `_fpmaxtostr':
OBJTREE/libc/stdio/_fpmaxtostr.c:189: undefined reference to `_savefpr_22'
OBJTREE/libc/stdio/_fpmaxtostr.c:265: undefined reference to `__gcc_qdiv'
OBJTREE/libc/stdio/_fpmaxtostr.c:278: undefined reference to `__gcc_qmul'
OBJTREE/libc/stdio/_fpmaxtostr.c:375: undefined reference to `__gcc_qsub'
OBJTREE/libc/stdio/_fpmaxtostr.c:376: undefined reference to `__gcc_qadd'
OBJTREE/libc/stdio/_fpmaxtostr.c:748: undefined reference to `_restfpr_22_x'
libc/libc_so.a(lldiv.os): In function `lldiv':
OBJTREE/libc/stdlib/lldiv.c:30: undefined reference to `__divdi3'
OBJTREE/libc/stdlib/lldiv.c:31: undefined reference to `__moddi3'
libc

[Bug tree-optimization/23286] missed fully redundant expression

2012-02-23 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23286

--- Comment #40 from Bernhard Reutner-Fischer  
2012-02-23 13:34:37 UTC ---
The ATTRIBUTE_UNUSED of do_hoist_insertion can be removed.

diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 0f777b4..bfc7a92 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -3865,7 +3865,7 @@ do_pre_partial_partial_insertion (basic_block block,
basic_block dom)
The caller has to make sure that BLOCK has at least two successors.  */

 static bool
-do_hoist_insertion (basic_block block ATTRIBUTE_UNUSED)
+do_hoist_insertion (basic_block block)
 {
   edge e;
   edge_iterator ei;
@@ -3878,6 +3878,13 @@ do_hoist_insertion (basic_block block ATTRIBUTE_UNUSED)
   /* At least two successors, or else...  */
   gcc_assert (EDGE_COUNT (block->succs) >= 2);

+  /* We cheat about AVAIL_OUT in the first block
+ so pretend we are done in the second iteration.  */
+  if (block->prev_bb
+  && block->prev_bb->index == ENTRY_BLOCK
+  && pre_stats.hoist_insert)
+return false;
+
   /* Check that all successors of BLOCK are dominated by block.
  We could use dominated_by_p() for this, but actually there is a much
  quicker check: any successor that is dominated by BLOCK can't have
@@ -3890,9 +3897,12 @@ do_hoist_insertion (basic_block block ATTRIBUTE_UNUSED)
   availout_in_some = BITMAP_ALLOC (&grand_bitmap_obstack);

   /* A hoistable value must be in ANTIC_IN(block)
- but not in AVAIL_OUT(BLOCK).  */
+ but not in AVAIL_OUT(BLOCK).
+ To give more opportunity to hoisting,
+ cheat by disregarding AVAIL_OUT of the ENTRY_BLOCK.  */
   bitmap_set_copy (hoistable_set, ANTIC_IN (block));
-  bitmap_set_subtract_values (hoistable_set, AVAIL_OUT (block));
+  if (block->prev_bb && block->prev_bb->index != ENTRY_BLOCK)
+bitmap_set_subtract_values (hoistable_set, AVAIL_OUT (block));

   /* Short-cut for a common case: hoistable_set is empty.  */
   if (bitmap_empty_p (&hoistable_set->values))


so for a simplified PR5738
$ cat pr5738.c
struct foo
{
  unsigned short *p;
};

#define foo_s s
void
func (struct foo *foo_s, unsigned int *coord, _Bool delta)
{
  unsigned short change;

  if (delta)
{
  change = *((foo_s)->p++);
  *coord += change;
}
  else
{
  change = *((foo_s)->p++);
  *coord += change;
//  *coord += *((foo_s)->p++) << 8;
}
}

we end up a little bit better, with something like

func (struct foo * sD.1705, unsigned intD.9 * coordD.1706, _BoolD.1685
deltaD.1707)
{
  unsigned intD.9 pretmp.6D.1727;
  short unsigned intD.16 * pretmp.5D.1726;
  short unsigned intD.16 pretmp.4D.1725;
  short unsigned intD.16 * pretmp.3D.1724;
  short unsigned intD.16 changeD.1710;
  unsigned intD.9 D.1718;
  unsigned intD.9 D.1717;
  unsigned intD.9 D.1716;
  short unsigned intD.16 * D.1715;
  short unsigned intD.16 * D.1714;

  # BLOCK 2 freq:1
  # PRED: ENTRY [100.0%]  (fallthru,exec)
  # VUSE <.MEMD.1720_17(D)>
  # PT = nonlocal escaped 
  pretmp.3D.1724_22 = sD.1705_2(D)->pD.1704;
  # VUSE <.MEMD.1720_17(D)>
  pretmp.4D.1725_23 = *pretmp.3D.1724_22;
  # PT = nonlocal escaped 
  pretmp.5D.1726_24 = pretmp.3D.1724_22 + 2;
  # VUSE <.MEMD.1720_17(D)>
  pretmp.6D.1727_25 = *coordD.1706_6(D);
  pretmp.6D.1727_26 = (unsigned intD.9) pretmp.4D.1725_23;
  pretmp.6D.1727_27 = pretmp.6D.1727_25 + pretmp.6D.1727_26;
  if (deltaD.1707_1(D) != 0)
goto ;
  else
goto ;
  # SUCC: 3 [39.0%]  (true,exec) 4 [61.0%]  (false,exec)

  # BLOCK 3 freq:3900
  # PRED: 2 [39.0%]  (true,exec)
  # .MEMD.1720_18 = VDEF <.MEMD.1720_17(D)>
  sD.1705_2(D)->pD.1704 = pretmp.5D.1726_24;
  # .MEMD.1720_19 = VDEF <.MEMD.1720_18>
  *coordD.1706_6(D) = pretmp.6D.1727_27;
  goto ;
  # SUCC: 5 [100.0%]  (fallthru,exec)

  # BLOCK 4 freq:6100
  # PRED: 2 [61.0%]  (false,exec)
  # .MEMD.1720_20 = VDEF <.MEMD.1720_17(D)>
  sD.1705_2(D)->pD.1704 = pretmp.5D.1726_24;
  # .MEMD.1720_21 = VDEF <.MEMD.1720_20>
  *coordD.1706_6(D) = pretmp.6D.1727_27;
  # SUCC: 5 [100.0%]  (fallthru,exec)

  # BLOCK 5 freq:1
  # PRED: 3 [100.0%]  (fallthru,exec) 4 [100.0%]  (fallthru,exec)
  # .MEMD.1720_16 = PHI <.MEMD.1720_19(3), .MEMD.1720_21(4)>
  # VUSE <.MEMD.1720_16>
  return;
  # SUCC: EXIT [100.0%] 

}
which translates to nearly proper code:

func:
.LFB0:
.cfi_startproc
movq(%rdi), %rax# sD.1705_2(D)->pD.1704, pretmp.3D.1724
leaq2(%rax), %rcx   #, pretmp.5D.1726
movzwl  (%rax), %eax# *pretmp.3D.1724_22, pretmp.6D.1727
addl(%rsi), %eax# *coordD.1706_6(D), pretmp.6D.1727
testb   %dl, %dl# deltaD.1707
movq%rcx, (%rdi)# pretmp.5D.1726, sD.1705_2(D)->pD.1704
movl%eax, (%rsi)# pretmp.6D.1727, *coordD.1706_6(D)
je  .L2 #,
ret
.L2:
ret
.cfi_endproc

where the expected code would be something like (i think):

func:
.LFB0:
.cfi_startproc
movq(%rdi), %rax# sD.1705_2(D)->pD.1704, D.1714
mov

[Bug testsuite/29882] gfortran testsuite doesn't recognize warnings and errors

2012-02-27 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29882

--- Comment #5 from Bernhard Reutner-Fischer  
2012-02-27 16:41:41 UTC ---
I think this is fixed by now ( see PR47750 )?


[Bug fortran/35015] missing cleanup-modules directive in testsuite/gfortran*

2012-03-01 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35015

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

   Keywords||patch
URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2012-03/msg00080.htm
   ||l

--- Comment #8 from Bernhard Reutner-Fischer  
2012-03-02 07:57:14 UTC ---
Alternative approach; Handle cleanup-modules in the testsuite implicitly


[Bug fortran/47750] testsuite/gfortran.dg: dg-warning and dg-error should be distinguished

2012-03-02 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47750

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||fxcoudert at gcc dot
   ||gnu.org

--- Comment #4 from Bernhard Reutner-Fischer  
2012-03-02 08:01:41 UTC ---
*** Bug 29882 has been marked as a duplicate of this bug. ***


[Bug testsuite/29882] gfortran testsuite doesn't recognize warnings and errors

2012-03-02 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29882

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE

--- Comment #6 from Bernhard Reutner-Fischer  
2012-03-02 08:01:41 UTC ---
fixed via PR47750

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


[Bug testsuite/16464] gfortran.dg test harness does not use loop

2012-03-02 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16464

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2012-03/msg00121.htm
   ||l
 CC||aldot at gcc dot gnu.org
 Resolution||WONTFIX

--- Comment #1 from Bernhard Reutner-Fischer  
2012-03-02 15:53:35 UTC ---
Closing as WONTFIX as per Richi.


[Bug testsuite/52665] New: scan-assembler output produces wrong FAIL due to matching .ident

2012-03-22 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52665

 Bug #: 52665
   Summary: scan-assembler output produces wrong FAIL due to
matching .ident
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: al...@gcc.gnu.org


I see this regression:
FAIL: gcc.target/i386/pr28946.c scan-assembler-not test

The culprit is the testsuite errnoeously matching my local branch name in the
assembler output's .ident.

$ grep scan ../../src/gcc-4.8/gcc/testsuite/gcc.target/i386/pr28946.c
/* { dg-final { scan-assembler-not "test" } } */

$ ./gcc/xgcc -B/scratch/obj.x86_64/gcc-4.8/gcc/
../../src/gcc-4.8/gcc/testsuite/gcc.target/i386/pr28946.c   -Os
-ffat-lto-objects -S  -o - | grep test
.ident"GCC: (GNU) 4.8.0 20120320 (experimental) [fixups-testsuite
revision 1dc2c94:40d1377:d28ff051e43bdf8f8aab692fbf6932a7211ca49d]"

Perhaps output for scan-assembler should be built with -fno-ident ?


[Bug testsuite/52665] scan-assembler output produces wrong FAIL due to matching .ident

2012-03-22 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52665

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||ro at gcc dot gnu.org
   Target Milestone|--- |4.8.0


[Bug testsuite/20567] dg-options in gcc.c-torture

2012-03-22 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20567

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org

--- Comment #6 from Bernhard Reutner-Fischer  
2012-03-22 13:36:09 UTC ---
(In reply to comment #4)
> The gfortran torture tests also need to support dg- options, starting with
> dg-final to allow cleaning up module files from the testsuite temporary
> directory.

implicit cleanup-modules in all gfortran related tests were recently
implemented, see testsuite/lib/fortran-modules.exp

I did not look if all torture tests pull in dg- nowadays (gcc.c-torture/compile
and gcc.c-torture/execute/ieee seem to include dg as opposed to the rest, from
a short look. Little bit of a mess, imho).
Is there consensus that all testcases should use dg (or gcc-dg) ?


[Bug testsuite/52665] scan-assembler output produces wrong FAIL due to matching .ident

2012-03-26 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52665

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||mikestump at comcast dot
   ||net

--- Comment #1 from Bernhard Reutner-Fischer  
2012-03-27 06:43:28 UTC ---
CC'ing testsuite maintainers


[Bug bootstrap/52840] New: bootstrap fails in libstdc++, missing compatibility.lo

2012-04-03 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52840

 Bug #: 52840
   Summary: bootstrap fails in libstdc++, missing compatibility.lo
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: al...@gcc.gnu.org


git clone @ svn r186099
Happens since about 2 weeks.
Host == Build == Target == x86_64-linux-gnu

../../src/gcc-4.8.orig/configure -v --enable-languages=all LD=/usr/bin/ld.bfd 
CFLAGS="-O2 -g3 -ggdb3" CXXFLAGS="-O2 -g3 -ggdb3" BOOT_CFLAGS="-O2 -g3 -ggdb3"
BOOT_CXXFLAGS="-O2 -g3 -ggdb3" CFLAGS_FOR_TARGET="-O2 -g3 -ggdb3"
CXXFLAGS_FOR_TARGET="-O2 -g3 -ggdb3" --prefix=/opt/x86_64/gcc-4.8.orig/
--enable-shared --with-system-zlib --libexecdir=/opt/x86_64/gcc-4.8.orig/lib
--enable-nls --without-included-gettext --enable-threads=posix
--program-suffix=-4.8.orig-HEAD --enable-__cxa_atexit
--enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --disable-werror --enable-checking=yes --enable-debug -C
--disable-intermodule --disable-libstdcxx-pch --enable-multilib
--enable-checking=release

[...]
libtool: link: ranlib .libs/libc++11convenience.a
libtool: link: ( cd ".libs" && rm -f "libc++11convenience.la" && ln -s
"../libc++11convenience.la" "libc++11convenience.la" )
make[8]: Leaving directory
`/scratch/obj.x86_64/gcc-4.8.orig/x86_64-unknown-linux-gnu/libstdc++-v3/src/debug/c++11'
make[8]: Entering directory
`/scratch/obj.x86_64/gcc-4.8.orig/x86_64-unknown-linux-gnu/libstdc++-v3/src/debug'
make[8]: *** No rule to make target `compatibility.lo', needed by
`libstdc++.la'.  Stop.
make[8]: Leaving directory
`/scratch/obj.x86_64/gcc-4.8.orig/x86_64-unknown-linux-gnu/libstdc++-v3/src/debug'
make[7]: *** [all-recursive] Error 1


[Bug bootstrap/52840] bootstrap fails in libstdc++, missing compatibility.lo

2012-04-03 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52840

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||bkoz at redhat dot com

--- Comment #1 from Bernhard Reutner-Fischer  
2012-04-03 08:02:22 UTC ---
Benjamin,

in r185950 you said:

-vpath % $(top_srcdir)/src
-vpath % $(top_srcdir)
+vpath % $(top_srcdir)/src/c++98
+vpath % $(top_srcdir)/src/c++11


[Bug bootstrap/52840] bootstrap fails in libstdc++, missing compatibility.lo

2012-04-03 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52840

--- Comment #2 from Bernhard Reutner-Fischer  
2012-04-03 10:20:07 UTC ---
The patchlet below reinstates bootstrapping for me.


diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index bb8bc2a..d662ec1 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-03  Bernhard Reutner-Fischer  
+
+* src/Makefile.am (build-debug): Do not adjust vpath dir, remove
+Makefile.tmp
+* src/Makefile.in: Adjust as per above.
+
 2012-04-02  Tristan Gingold  

 * crossconfig.m4 (*-*-*vms*): Add.
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 28430cf..a1eb04d 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -293,7 +293,7 @@ build-debug: stamp-debug
   mv Makefile Makefile.tmp; \
   sed -e 's,all-local: all-once,all-local:,' \
   -e 's,install-data-local: install-data-once,install-data-local:,' \
-  -e 's,src/c,src/debug/c,' \
+  -e '/vpath/!s,src/c,src/debug/c,' \
   < Makefile.tmp > Makefile ; \
   $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \
   toolexeclibdir=$(glibcxx_toolexeclibdir)/debug all) ;
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 3c1facf..b10d853 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -914,7 +914,7 @@ build-debug: stamp-debug
   mv Makefile Makefile.tmp; \
   sed -e 's,all-local: all-once,all-local:,' \
   -e 's,install-data-local: install-data-once,install-data-local:,' \
-  -e 's,src/c,src/debug/c,' \
+  -e '/vpath/!s,src/c,src/debug/c,' \
   < Makefile.tmp > Makefile ; \
   $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \
   toolexeclibdir=$(glibcxx_toolexeclibdir)/debug all) ;


[Bug bootstrap/52840] bootstrap fails in libstdc++, missing compatibility.lo

2012-04-05 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52840

--- Comment #4 from Bernhard Reutner-Fischer  
2012-04-05 07:00:41 UTC ---
Author: aldot
Date: Thu Apr  5 07:00:30 2012
New Revision: 186156

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186156
Log:
PR bootstrap/52840: libstdc++: let debug find sources for compatibility.lo

2012-04-05  Bernhard Reutner-Fischer  

PR bootstrap/52840
* src/Makefile.am (build-debug): Do not adjust vpath dir, remove
Makefile.tmp
* src/Makefile.in: Adjust as per above.



Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/src/Makefile.am
trunk/libstdc++-v3/src/Makefile.in


[Bug bootstrap/52840] bootstrap fails in libstdc++, missing compatibility.lo

2012-04-05 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52840

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.8.0

--- Comment #5 from Bernhard Reutner-Fischer  
2012-04-05 07:02:18 UTC ---
Fixed on trunk.
thanks,


[Bug testsuite/52665] scan-assembler output produces wrong FAIL due to matching .ident

2018-09-05 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52665

--- Comment #4 from Bernhard Reutner-Fischer  ---
Author: aldot
Date: Wed Sep  5 15:31:13 2018
New Revision: 264128

URL: https://gcc.gnu.org/viewcvs?rev=264128&root=gcc&view=rev
Log:
PR52665 do not let .ident confuse assembler scan tests

A branch with a name matching scan-assembler pattern triggers
inappropriate FAIL.

E.g. branch fixups-testsuite and
- gcc.target/i386/pr65871-?.c (scan-assembler-not "test")
- gcc.target/i386/pr41442.c (scan-assembler-times "test|cmp" 2)
etc.

This is a recurring problem as can be seen by some -fno-ident additions
by commits from e.g. Michael Meissner over the years: builtins-58.c,
powerpc/pr46728-?.c

The patch below adds -fno-ident if a testcase contains one of
scan-assembler, scan-assembler-not or scan-assembler-times.

Regression tested on x86_64-unknown-linux on a fixups-testsuite branch
where it fixes several false FAILs without regressions.

gcc/testsuite/ChangeLog

2016-06-18  Bernhard Reutner-Fischer  

PR testsuite/52665
* lib/gcc-dg.exp (gcc-dg-test-1): Iterate over _required_options.
* lib/target-supports.exp (scan-assembler_required_options,
scan-assembler-not_required_options,
scan-assembler-times_required_options): Add -fno-ident.
* lib/scanasm.exp (scan-assembler-times): Fix error message.
* c-c++-common/ident-0a.c: New test.
* c-c++-common/ident-0b.c: New test.
* c-c++-common/ident-1a.c: New test.
* c-c++-common/ident-1b.c: New test.
* c-c++-common/ident-2a.c: New test.
* c-c++-common/ident-2b.c: New test.


Added:
trunk/gcc/testsuite/c-c++-common/ident-0a.c
trunk/gcc/testsuite/c-c++-common/ident-0b.c
trunk/gcc/testsuite/c-c++-common/ident-1a.c
trunk/gcc/testsuite/c-c++-common/ident-1b.c
trunk/gcc/testsuite/c-c++-common/ident-2a.c
trunk/gcc/testsuite/c-c++-common/ident-2b.c
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/lib/gcc-dg.exp
trunk/gcc/testsuite/lib/target-supports.exp

[Bug fortran/68800] Fortran FE produces many memory leaks

2018-10-15 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68800

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org

--- Comment #3 from Bernhard Reutner-Fischer  ---
(In reply to Martin Liška from comment #0)

> are definitely lost: 2004 occurences
>   calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
>   xcalloc (xmalloc.c:163)
>   gfc_get_namespace(gfc_namespace*, int) (symbol.c:2508)
>   generate_finalization_wrapper (class.c:1589)
>   gfc_find_derived_vtab(gfc_symbol*) (class.c:2406)
>   resolve_fl_derived(gfc_symbol*) (resolve.c:13389)
>   resolve_symbol(gfc_symbol*) (resolve.c:13669)
>   do_traverse_symtree(gfc_symtree*, void (*)(gfc_symtree*), void
> (*)(gfc_symbol*)) (symbol.c:3817)
>   resolve_types(gfc_namespace*) (resolve.c:15443)
>   gfc_resolve(gfc_namespace*) [clone .part.47] (resolve.c:15553)
>   gfc_parse_file() (parse.c:5757)
>   gfc_be_parse_file() (f95-lang.c:201)
>   compile_file() (toplev.c:464)

This first one..

> are definitely lost: 1476 occurences
>   calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
>   xcalloc (xmalloc.c:163)
>   gfc_get_typebound_proc(gfc_typebound_proc*) (symbol.c:4669)
>   match_procedure_in_type (decl.c:8749)
>   gfc_match_procedure() (decl.c:5480)
>   match_word(char const*, match (*)(), locus*) [clone .part.4] (parse.c:65)
>   decode_statement() (parse.c:531)
>   next_free (parse.c:1076)
>   next_statement() (parse.c:1310)
>   parse_derived_contains (parse.c:2549)
>   parse_derived (parse.c:2751)
>   parse_spec(gfc_statement) (parse.c:3368)
>   parse_module() (parse.c:5421)
>   gfc_parse_file() (parse.c:5737)
>   gfc_be_parse_file() (f95-lang.c:201)
>   compile_file() (toplev.c:464)

This is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56491
Patch at https://gcc.gnu.org/ml/fortran/2018-09/msg00045.html and will be fixed
when merging the surrounding series.


> are definitely lost: 1401 occurences
>   calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
>   xcalloc (xmalloc.c:163)
>   gfc_get_namespace(gfc_namespace*, int) (symbol.c:2508)
>   generate_finalization_wrapper (class.c:1589)
>   gfc_find_derived_vtab(gfc_symbol*) (class.c:2406)
>   resolve_fl_derived(gfc_symbol*) (resolve.c:13389)
>   resolve_symbol(gfc_symbol*) (resolve.c:13669)
>   do_traverse_symtree(gfc_symtree*, void (*)(gfc_symtree*), void
> (*)(gfc_symbol*)) (symbol.c:3817)
>   resolve_types(gfc_namespace*) (resolve.c:15443)
>   gfc_resolve(gfc_namespace*) [clone .part.47] (resolve.c:15553)
>   resolve_all_program_units (parse.c:5551)
>   gfc_parse_file() (parse.c:5803)
>   gfc_be_parse_file() (f95-lang.c:201)
>   compile_file() (toplev.c:464)

.. and this second one will be fixed by

https://gcc.gnu.org/ml/fortran/2018-10/msg00064.html from later in
aforementioned series.

[Bug fortran/87734] New: ICE in is_illegal_recursion check for character len= parameter

2018-10-24 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87734

Bug ID: 87734
   Summary: ICE in is_illegal_recursion check for character len=
parameter
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
  Target Milestone: ---

Created attachment 44891
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44891&action=edit
reduced from flibs-svncode/trunk/src/strings/m_vstring.f90 --
sf.net/projects/flibs

flibs-svncode/trunk/src/strings/m_vstring.f90

Builds fine with gfortran-4.8
ICEs with current trunk:

$ gfortran -c -o a.o m_vstring.f90

f951: internal compiler error: in is_illegal_recursion, at
fortran/resolve.c:1688
0x93f623 is_illegal_recursion
../../../src/gcc-9.0.mine/gcc/fortran/resolve.c:1688
0x942ff8 resolve_function
../../../src/gcc-9.0.mine/gcc/fortran/resolve.c:3294
0x94b2f7 gfc_resolve_expr(gfc_expr*)
../../../src/gcc-9.0.mine/gcc/fortran/resolve.c:6809
0x8b7256 gfc_reduce_init_expr(gfc_expr*)
../../../src/gcc-9.0.mine/gcc/fortran/expr.c:2799
0x896d3a gfc_match_char_spec(gfc_typespec*)
../../../src/gcc-9.0.mine/gcc/fortran/decl.c:3261
0x89860a gfc_match_decl_type_spec(gfc_typespec*, int)
../../../src/gcc-9.0.mine/gcc/fortran/decl.c:3904
0x89ba26 gfc_match_data_decl()
../../../src/gcc-9.0.mine/gcc/fortran/decl.c:5831
0x9265dd match_word
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:65
0x927190 decode_statement
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:376
0x92bca0 next_free
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:1234
0x92c23f next_statement
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:1466
0x92f6c4 parse_spec
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:3860
0x93267d parse_progunit
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:5671
0x93236d parse_contained
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:5574
0x932d61 parse_module

(gdb) up
#1  0x0093f624 in is_illegal_recursion (sym=0x2ec81a0, 
context=0x2ecbc80) at ../../../src/gcc-9.0.mine/gcc/fortran/resolve.c:1688
1688  gcc_assert (sym->attr.flavor == FL_PROCEDURE);
(gdb) p sym->name
$1 = 0x770ce6a0 "vstring_length"
(gdb) p sym->attr.flavor 
$2 = FL_UNKNOWN


PS: to build the full flibs you currently have to
svn checkout
# fix the most severe bugs in the config script:
sed -i -e 's/==/=/g' -e 's/@$\([0-9]\)/"@$\1"/g' configure.sh
OSTYPE=linux-gnu ./configure.sh
cd make/makefile
make

[Bug fortran/87734] ICE in is_illegal_recursion check for character len= parameter

2018-10-24 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87734

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
  Known to work||4.8.4, 4.9.2
Version|unknown |9.0
   Target Milestone|--- |9.0
  Known to fail||6.4.0, 7.3.0, 8.2.0

[Bug target/30354] -Os doesn't optimize a/CONST even if it saves size.

2016-04-20 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30354

--- Comment #19 from Bernhard Reutner-Fischer  ---
(In reply to Denis Vlasenko from comment #17)
> Any chance of this being finally done?
> 
> I proposed a simple, working patch in 2007, it's 2016 now and all these
> years users of -Os suffer from slow divisions in important cases usch as
> "signed_int / 16" and "unsigned_int / 10".

> So.
> Any chance of this patch being accepted sometime before 2100? ;)

For GCC you need to follow https://gcc.gnu.org/contribute.html to submit
patches.

https://gcc.gnu.org/contribute.html#legal is the first obstacle unless you
happen to work for a company (like e.g. redhat) that has company-wide copyright
assignment in place. Alternatively you can put your changes in Public Domain or
go through an individual copyright assignment process for GCC with the FSF.

Then you have to create proper testcases in dejagnu form included in your patch
and have to submit that to the gcc-patches@ ML after proper bootstrapping and
regression testing. It is recommended to Cc: the maintainer(s) of the
architectures/subsystems/files you are touching in your patch submission to
gain their attention. See toplevel MAINTAINERS file.
If you want to ensure that object-size increase/regressions in your testcases
get noticed, you can add a dejagnu check for that (see
gcc/testsuite/lib/scanasm.exp:proc object-size).

For details on patch submission please refer to:

https://gcc.gnu.org/contribute.html#patches

HTH,

[Bug rtl-optimization/70703] [6/7 regression] Regression in register usage on x86

2016-04-20 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70703

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org,
   ||hubicka at gcc dot gnu.org,
   ||uros at gcc dot gnu.org
 Blocks||16996

--- Comment #1 from Bernhard Reutner-Fischer  ---
Cc Uros


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16996
[Bug 16996] [meta-bug] code size improvements

[Bug rtl-optimization/70703] [6/7 regression] Regression in register usage on x86

2016-06-14 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70703

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

   Last reconfirmed||2016-6-14
 CC||rdsandiford at googlemail dot 
com,
   ||vmakarov at redhat dot com
  Known to work||4.9.3
  Known to fail||5.1.0

--- Comment #3 from Bernhard Reutner-Fischer  ---
CCing Vlad and Richard S.
Started with r211072

https://gcc.gnu.org/ml/gcc-patches/2014-05/msg02482.html

[Bug rtl-optimization/70703] [6/7 regression] Regression in register usage on x86

2016-06-14 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70703

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

[Bug driver/83016] New: gnat1: warning: command line option ‘-nostdinc++’ is valid for C++/ObjC++ but not for Ada

2017-11-16 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83016

Bug ID: 83016
   Summary: gnat1: warning: command line option ‘-nostdinc++’ is
valid for C++/ObjC++ but not for Ada
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: driver
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
CC: charlet at adacore dot com, derodat at adacore dot com,
ebotcazou at libertysurf dot fr
  Target Milestone: ---

When bootstrapping trunk @253865 (for example, IIRC occurs since quite some
time now):

xg++ -c -gnatA -gnatWb -gnatiw -B/scratch/obj.x86_64/gcc-8.0.mine/./gcc/
-nostdinc++ -nostdinc++
-I/scratch/obj.x86_64/gcc-8.0.mine/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
-I/scratch/obj.x86_64/gcc-8.0.mine/x86_64-pc-linux-gnu/libstdc++-v3/include
-I/scratch/src/gcc-8.0.mine/libstdc++-v3/libsupc++
-I/scratch/src/gcc-8.0.mine/libstdc++-v3/include/backward
-I/scratch/src/gcc-8.0.mine/libstdc++-v3/testsuite/util
-B/scratch/obj.x86_64/gcc-8.0.mine/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-B/scratch/obj.x86_64/gcc-8.0.mine/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs
-B/opt/x86_64/gcc-8.0.mine/x86_64-pc-linux-gnu/bin/
-B/opt/x86_64/gcc-8.0.mine/x86_64-pc-linux-gnu/lib/ -isystem
/opt/x86_64/gcc-8.0.mine/x86_64-pc-linux-gnu/include -isystem
/opt/x86_64/gcc-8.0.mine/x86_64-pc-linux-gnu/sys-include -static-libstdc++
-static-libgcc -I- -I../rts -I. -I/scratch/src/gcc-8.0.mine/gcc/ada
-static-libstdc++ -static-libgcc -gnatws
/scratch/obj.x86_64/gcc-8.0.mine/gcc/ada/tools/b~gnatcmd.adb
gnat1: warning: command line option ‘-nostdinc++’ is valid for C++/ObjC++ but
not for Ada

ISTM the driver should filter out -nostdinc++ for ADA (or gnat1 should silently
ignore it)

[Bug driver/83016] gnat1: warning: command line option ‘-nostdinc++’ is valid for C++/ObjC++ but not for Ada

2017-11-16 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83016

--- Comment #2 from Bernhard Reutner-Fischer  ---
../../src/gcc-8.0.mine/configure \  
-v \
--enable-languages=c,fortran,c++,go,objc,obj-c++,lto,ada \  
CFLAGS='-O0 -g3 -ggdb3 ' \  
CXXFLAGS='-O0 -g3 -ggdb3 ' \
'BOOT_CFLAGS=-O0 -g3 -ggdb3 ' \ 
'BOOT_CXXFLAGS=-O0 -g3 -ggdb3 ' \   
'CFLAGS_FOR_TARGET=-O0 -g3 -ggdb3 ' \   
'CXXFLAGS_FOR_TARGET=-O0 -g3 -ggdb3 ' \ 
--prefix=/opt/x86_64/gcc-8.0.mine// \   
--enable-shared \   
--without-system-zlib \ 
--enable-nls \  
--without-included-gettext \
--enable-threads=posix \
--enable-__cxa_atexit \ 
--enable-libstdcxx-allocator=mt \   
--enable-clocale=gnu \  
--enable-libstdcxx-debug \  
--enable-mpfr \ 
--disable-werror \  
--enable-checking=yes \ 
--enable-debug \
-C \
--disable-intermodule \ 
--enable-multilib \ 
--disable-libstdcxx-pch \   
--enable-bootstrap \
--enable-checking=yes \ 
--with-cpu=native \ 
--with-tune=native \
--enable-plugin
make bootstrap

[Bug c/65534] New: tailcall not optimized away

2015-03-23 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65534

Bug ID: 65534
   Summary: tailcall not optimized away
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
CC: hubicka at ucw dot cz, rguenth at gcc dot gnu.org

Maybe this could be optimized by a thunk or by creating the alias automatically
or the like? Or is tailcall supposed to do this already?

trunk@221345
$ gcc -Os -c missed-opt.c -o missed-opt.plain.o
$ gcc -Os -c missed-opt.c -o missed-opt.manual.o -DOPTIMIZE_MANUALLY
$ size missed-opt.*.o
   text   databssdechexfilename
 86  0  0 86 56missed-opt.manual.o
104  0  0104 68missed-opt.plain.o

$ cat missed-opt.c ; echo EOF
static int fd = -1;
extern void dummy0(void);
extern void dummy1(int);
extern void setutent(void) __attribute__ ((__nothrow__ ));
extern __typeof (setutent) setutent __asm__ ("" "__GI_setutent")
__attribute__ ((visibility ("hidden")));
extern void getutent(void) __attribute__ ((__nothrow__ ));
extern __typeof (getutent) getutent __asm__ ("" "__GI_getutent")
__attribute__ ((visibility ("hidden")));
static void __setutent_unlocked(void) {
if (fd < 0) {
dummy0();
if (fd < 0) {
dummy0();
if (fd < 0)
return;
}
return;
}
dummy1(fd);
}
#ifndef OPTIMIZE_MANUALLY
void setutent(void) {
((void)0);
__setutent_unlocked();
((void)0);
}
#else
extern __typeof (__setutent_unlocked) setutent
__attribute__ ((alias ("__setutent_unlocked")));
#endif
extern __typeof (setutent) __EI_setutent __asm__("" "setutent");
extern __typeof (setutent) __EI_setutent
__attribute__((alias ("" "__GI_setutent")));

static void __getutent_unlocked(void) {
if (fd < 0)
__setutent_unlocked();
}

#ifndef OPTIMIZE_MANUALLY
void getutent(void) {
((void)0);
__getutent_unlocked();
((void)0);
}
#else
extern __typeof (__getutent_unlocked) getutent
__attribute__ ((alias ("__getutent_unlocked")));
#endif
extern __typeof (getutent) __EI_getutent __asm__("" "getutent");
extern __typeof (getutent) __EI_getutent
__attribute__((alias ("" "__GI_getutent")));

EOF


[Bug middle-end/35341] Early exit loop with short known trip count not unrolled

2015-03-23 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35341

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org

--- Comment #1 from Bernhard Reutner-Fischer  ---
Did you forget to specify -funroll-loops?

gcc-4.2 -O2 -funroll-loops and gcc-4.4 as well as 5.0 with these options
basically generate this optimized dump, which IIUC is what you want.

;; Function foo (foo)

Analyzing Edge Insertions.
foo ()
{
  int temp.34;
  int temp.31;
  int temp.29;
  int temp.26;
  int temp.25;

:
  temp.25 = a[0];
  temp.26 = temp.25 + temp.25;
  a[0] = temp.26;
  if (temp.26 == 10)
goto ;
  else
goto ;

:
  temp.29 = a[2] + a[1];
  a[2] = temp.29;
  if (temp.29 == 10)
goto ;
  else
goto ;

:
  temp.31 = temp.29 + a[4];
  a[4] = temp.31;
  if (temp.31 == 10)
goto ;
  else
goto ;

:
  temp.34 = a[6] + a[3];
  a[6] = temp.34;
  if (temp.34 == 10)
goto ;
  else
goto ;

:
  a[8] = [plus_expr] a[8] + a[4];

:
  return 0;

}


[Bug target/55143] vms-c.o:(.toc+0x0): undefined reference to `c_default_pointer_mode' (building cc1plus)

2015-04-08 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55143

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed|2013-02-27 00:00:00 |2015-04-08
 CC||aldot at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Bernhard Reutner-Fischer  ---
Confirmed with trunk@221914.

c/c-decl.o gets linked into cc1 but not into cc1plus.

Sounds like c_default_pointer_mode should be moved to e.g. c-family/c-common.c


[Bug middle-end/55035] reload1.c:3766:41: error: ‘orig_dup[0]’ may be used uninitialized in this function (for fr30, microblaze, moxie, rl78)

2015-04-09 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55035

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

   Last reconfirmed|2014-07-27 00:00:00 |2015-4-9
 CC||aldot at gcc dot gnu.org
  Known to fail|4.10.0  |5.0

--- Comment #4 from Bernhard Reutner-Fischer  ---
Reconfirmed.

Nowadays (trunk@221914) also breaks all-gcc for nios2-linux-gnu.
Reminds me of bug #36550

Smallish testcase:

$ cat reload1.i ; echo EOF
/* PR target/55035 */
/* { dg-do compile } */
/* { dg-options "-O2 -W -Wall -Werror" } */
struct rtx_def;
typedef struct rtx_def *rtx;
enum rtx_code {
  UNKNOWN,
  INSN, 
  ASM_INPUT,
  CLOBBER
};
struct rtx_def {
  enum rtx_code code: 4;
};
class rtx_def;
class rtx_insn : public rtx_def {};
struct recog_data_d
{
  rtx operand[30];
  rtx *operand_loc[30];
  rtx *dup_loc[1];
  char dup_num[1];
  char n_operands;
  char n_dups;
};
extern struct recog_data_d recog_data;
extern int get_int(void);
void
elimination_costs_in_insn (rtx_insn *insn)
{
  int icode = get_int ();
  int i;
  rtx orig_operand[30];
  rtx orig_dup[30];
  if (icode < 0)
{
  if (((enum rtx_code) insn->code) == INSN)
__builtin_abort();
  return;
}
  for (i = 0; i < recog_data.n_dups; i++)
orig_dup[i] = *recog_data.dup_loc[i];
  for (i = 0; i < recog_data.n_operands; i++)
{
  orig_operand[i] = recog_data.operand[i];
  if (orig_operand[i]->code == CLOBBER)
*recog_data.operand_loc[i] = 0;
}
  for (i = 0; i < recog_data.n_dups; i++)
*recog_data.dup_loc[i]
  = *recog_data.operand_loc[(int) recog_data.dup_num[i]];
  for (i = 0; i < recog_data.n_dups; i++)
*recog_data.dup_loc[i] = orig_dup[i];
}
EOF

$ g++ -O2 -W -Wall -Werror -c reload1.i -o reload1.o
reload1.i: In function ‘void elimination_costs_in_insn(rtx_insn*)’:
reload1.i:53:41: error: ‘orig_dup[0]’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
 *recog_data.dup_loc[i] = orig_dup[i];
 ^
cc1plus: all warnings being treated as errors

[Bug target/55144] opening glibc-c.o: No such file or directory

2015-04-22 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55144

--- Comment #2 from Bernhard Reutner-Fischer  ---
Author: aldot
Date: Wed Apr 22 08:25:40 2015
New Revision: 222313

URL: https://gcc.gnu.org/viewcvs?rev=222313&root=gcc&view=rev
Log:
PR target/55144

building all-gcc for bfin-linux-uclibc resulted in

build/genchecksum cp/cp-lang.o c-family/stub-objc.o ... glibc-c.o \
libbackend.a .. > cc1plus-checksum.c.tmp
opening glibc-c.o: No such file or directory
make[2]: *** [cc1-checksum.c] Error 1


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.gcc


[Bug target/47122] vax-*-openbsd* configuration purports to require openbsd-pthread.h

2015-04-22 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47122

--- Comment #1 from Bernhard Reutner-Fischer  ---
Author: aldot
Date: Wed Apr 22 08:30:15 2015
New Revision: 222314

URL: https://gcc.gnu.org/viewcvs?rev=222314&root=gcc&view=rev
Log:
PR target/47122: vax-*-openbsd* config.gcc typo

Gerald / jsg typoed this in the initial r152218 a.k.a
8e6600a15374f9446d5026e8ef6b68e0d753fb6c


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.gcc


[Bug target/47098] i686-openbsd3.0: OBSD_LIB_SPEC missing

2015-04-22 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47098

--- Comment #3 from Bernhard Reutner-Fischer  ---
Author: aldot
Date: Wed Apr 22 08:41:13 2015
New Revision: 222315

URL: https://gcc.gnu.org/viewcvs?rev=222315&root=gcc&view=rev
Log:
PR target/47098 OBSD_LIB_SPEC on i686-openbsd3 missing

config-list.mk for i686-*-openbsd3.0 failed with:

gcc/config/openbsd.h:143:18: error: ‘OBSD_LIB_SPEC’ was not declared in this
scope
 #define LIB_SPEC OBSD_LIB_SPEC
  ^
gcc/gcc.c:879:31: note:
in expansion of macro ‘LIB_SPEC’
 static const char *lib_spec = LIB_SPEC;
   ^
make[2]: *** [gcc.o] Error 1

i.e. openbsd-oldgas.h is only used on
i?86-*-openbsd2.*|i?86-*openbsd3.[0123] so add the OBSD_LIB_SPEC there


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/openbsd-oldgas.h

[Bug target/47098] i686-openbsd3.0: OBSD_LIB_SPEC missing

2015-04-22 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47098

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

  Known to work||6.0
  Known to fail|5.0 |4.8.0, 4.9.2

--- Comment #4 from Bernhard Reutner-Fischer  ---
Fixed on the trunk.


[Bug target/55144] opening glibc-c.o: No such file or directory

2015-04-22 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55144

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed|2013-02-27 00:00:00 |2015-04-22
 CC||aldot at gcc dot gnu.org
  Known to work||6.0
 Ever confirmed|0   |1
  Known to fail||4.8.0, 4.9.2, 5.0

--- Comment #3 from Bernhard Reutner-Fischer  ---
Fixed on the trunk.


[Bug target/47122] vax-*-openbsd* configuration purports to require openbsd-pthread.h

2015-04-22 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47122

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed|2012-10-23 00:00:00 |2015-04-22
 CC||aldot at gcc dot gnu.org
  Known to work||6.0
 Ever confirmed|0   |1
  Known to fail||4.9.0, 5.0

--- Comment #2 from Bernhard Reutner-Fischer  ---
Fixed on the trunk.


[Bug target/48904] x86_64-knetbsd-gnu fails to build

2015-04-22 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48904

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed|2013-02-25 00:00:00 |2015-04-22
 CC||aldot at gcc dot gnu.org
 Ever confirmed|0   |1
  Known to fail||4.9.0, 5.0

--- Comment #3 from Bernhard Reutner-Fischer  ---
confirmed.

PR target/48904: x86_64-knetbsd-gnu missing defs

2012-09-21  H.J. Lu  

* config.gcc (x86_64-*-knetbsd*-gnu): Add i386/knetbsd-gnu64.h.
* config/i386/knetbsd-gnu64.h: New file


[Bug jit/66054] New: bootstrap comparison failure with --enable-host-shared

2015-05-07 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66054

Bug ID: 66054
   Summary: bootstrap comparison failure with --enable-host-shared
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Keywords: build
  Severity: minor
  Priority: P3
 Component: jit
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
CC: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

Bootstrapping with --enable-host-shared fails stage2/3 comparison for all but
crt files.

Comparing stages 2 and 3
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1objplus-checksum.o differs
Bootstrap comparison failure!
gcc/builtins.o differs
[snip gcc/{,*/}*.o libbacktrace/{,.libs/}*.o libcpp/*.o libdecnumber/*.o
libiberty/*.o lto-plugin/.libs/*.o zlib/*.o]
make[2]: *** [compare] Error 1
make[2]: Leaving directory `/obj.x86_64/gcc-6.0.orig'
make[1]: *** [stage3-bubble] Error 2

for me when i

../../src/gcc-6.0.orig/configure \
  -v \
  --enable-languages=c,lto,fortran,c++,go,objc,obj-c++,jit \
  LD="ld" \
  CFLAGS="-g -O2" \
  CXXFLAGS="-g -O2" \
  BOOT_CFLAGS="-g -O2" \
  BOOT_CXXFLAGS="-g -O2" \
  CFLAGS_FOR_TARGET="-g -O2" \
  CXXFLAGS_FOR_TARGET="-g -O2" \
  --prefix=/opt/x86_64/gcc-6.0.orig// \
  --enable-shared \
  --without-system-zlib \
  --enable-nls \
  --without-included-gettext \
  --enable-threads=posix \
  --enable-__cxa_atexit \
  --enable-libstdcxx-allocator=mt \
  --enable-clocale=gnu \
  --enable-libstdcxx-debug \
  --enable-mpfr \
  --disable-werror \
  --enable-debug \
  --with-isl=/opt/x86_64/isl \
  -C \
  --disable-intermodule \
  --enable-multilib \
  --disable-libstdcxx-pch \
  --enable-bootstrap \
  --enable-host-shared \
  --enable-checking=yes \
  --with-cpu=native \
  --with-tune=native \
  --enable-plugin

ISTM that nowadays at least some libraries already have pic/*.o (libiberty
comes to mind)


[Bug target/48904] x86_64-knetbsd-gnu fails to build

2015-05-08 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48904

--- Comment #4 from Bernhard Reutner-Fischer  ---
Author: aldot
Date: Fri May  8 07:33:42 2015
New Revision: 222903

URL: https://gcc.gnu.org/viewcvs?rev=222903&root=gcc&view=rev
Log:
PR target/48904 x86_64-knetbsd-gnu missing defs

2015-05-08  H.J. Lu  
Bernhard Reutner-Fischer  

PR target/48904
* config.gcc (x86_64-*-knetbsd*-gnu): Add i386/knetbsd-gnu64.h.
* config/i386/knetbsd-gnu64.h: New file.


Added:
trunk/gcc/config/i386/knetbsd-gnu64.h
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.gcc


[Bug target/48904] x86_64-knetbsd-gnu fails to build

2015-05-08 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48904

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

  Known to work||6.0

--- Comment #5 from Bernhard Reutner-Fischer  ---
Fixed on the trunk.


[Bug preprocessor/59805] New: invalid preprocessing directive not diagnosed with assembler-with-cpp

2014-01-14 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59805

Bug ID: 59805
   Summary: invalid preprocessing directive not diagnosed with
assembler-with-cpp
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Keywords: diagnostic
  Severity: normal
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
CC: tromey at redhat dot com

-x assembler-with-cpp remains silent instead of emitting some kind of
diagnostics.

$ cat libcpp-bug.c
# INCLUDE <./does-not-exist.HHH>
# HUH <./does-not-exist.HHH>
$ gcc -x assembler-with-cpp -o xxx.o -c libcpp-bug.c -W -Wall -pedantic -Wextra 

Properly diagnosed with c or c-header:

$ gcc -x c -o xxx.o -c libcpp-bug.c -W -Wall -pedantic -Wextra 
libcpp-bug.c:1:3: error: invalid preprocessing directive #INCLUDE
 # INCLUDE <./does-not-exist.HHH>
   ^
libcpp-bug.c:2:3: error: invalid preprocessing directive #HUH
 # HUH <./does-not-exist.HHH>
   ^
libcpp-bug.c:2:0: warning: ISO C forbids an empty translation unit [-Wpedantic]
 # HUH <./does-not-exist.HHH>
 ^

gcc-4.9-trunk@206144

Since the #INCLUDE was not processed this missing diagnostics resulted in wrong
code generated, but adding that keyword.
Didn't look if this is a driver bug.


[Bug rtl-optimization/59858] New: [4.8/4.9 Regression] ICE: assign_by_spills, at lra-assigns.c:1283

2014-01-17 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59858

Bug ID: 59858
   Summary: [4.8/4.9 Regression] ICE: assign_by_spills, at
lra-assigns.c:1283
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
CC: vmakarov at redhat dot com
Target: arm

Created attachment 31870
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31870&action=edit
original source

trunk@206671

$ arm-oe-linux-uclibceabi-gcc -v -march=armv5te -marm -mthumb-interwork -Wall
-Wstrict-prototypes -Wstrict-aliasing -funsigned-char -fno-builtin -fno-asm
-msoft-float -std=gnu99 -mlittle-endian -mthumb -fno-stack-protector  -Os -pipe
-g -feliminate-unused-debug-types -funit-at-a-time -fmerge-all-constants
-fstrict-aliasing -fno-tree-loop-optimize -fno-tree-dominator-opts
-fno-strength-reduce -fPIC   -c regex_arm_bug.i -o foo.o
Using built-in specs.
COLLECT_GCC=arm-oe-linux-uclibceabi-gcc
Target: arm-oe-linux-uclibceabi
Configured with:
/scratch/obj.x86_64/oe/build/build/tmp-uclibc/work-shared/gcc-4.9.0+gitAUTOINC+e6e3a925b2-r0/git/configure
--build=x86_64-linux --host=x86_64-linux --target=arm-oe-linux-uclibceabi
--prefix=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/usr
--exec_prefix=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/usr
--bindir=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/usr/bin/armv5te-oe-linux-uclibceabi.gcc-cross-initial
--sbindir=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/usr/bin/armv5te-oe-linux-uclibceabi.gcc-cross-initial
--libexecdir=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/usr/libexec/armv5te-oe-linux-uclibceabi.gcc-cross-initial
--datadir=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/usr/share
--sysconfdir=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/etc
--sharedstatedir=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/com
--localstatedir=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/var
--libdir=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/usr/lib/armv5te-oe-linux-uclibceabi.gcc-cross-initial
--includedir=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/usr/include
--oldincludedir=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/usr/include
--infodir=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/usr/share/info
--mandir=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/usr/share/man
--disable-silent-rules --disable-dependency-tracking
--with-libtool-sysroot=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux
--with-newlib --without-headers --disable-shared --disable-threads
--disable-multilib --disable-__cxa_atexit --enable-languages=c
--enable-target-optspace --program-prefix=arm-oe-linux-uclibceabi-
--with-sysroot=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/qemuarm
--with-build-sysroot=/scratch/obj.x86_64/oe/build/build/tmp-uclibc/work/armv5te-oe-linux-uclibceabi/gcc-cross-initial/4.9.0+gitAUTOINC+e6e3a925b2-r0/gcc-4.9.0+gitAUTOINC+e6e3a925b2/build.x86_64-linux.arm-oe-linux-uclibceabi/tmpsysroot
--disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath
--with-system-zlib --disable-lto --disable-plugin --enable-decimal-float=no
--with-float=soft --with-native-system-header-dir=/usr/include --disable-nls
--disable-decimal-float --enable-__cxa_atexit
Thread model: single
gcc version 4.9.0 20140116 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-march=armv5te' '-marm' '-mthumb-interwork' '-Wall'
'-Wstrict-prototypes' '-Wstrict-aliasing' '-funsigned-char' '-fno-builtin'
'-fno-asm' '-mfloat-abi=soft' '-std=gnu99' '-mlittle-endian' '-mthumb'
'-fno-stack-protector' '-Os' '-pipe' '-g' '-feliminate-unused-debug-types'
'-funit-at-a-time' '-fmerge-all-constants' '-fstrict-aliasing'
'-fno-tree-loop-optimize' '-fno-tree-dominator-opts' '-fPIC' '-c' '-o' 'foo.o'
'-mtls-dialect=gnu'

/scratch/obj.x86_64/oe/build/build/tmp-uclibc/sysroots/x86_64-linux/usr/libexec/armv5te-oe-linux-uclibceabi.gcc-cross-initial/gcc/arm-oe-linux-uclibceabi/4.9.0/cc1
-fpreprocessed regex_arm_bug.i -quiet -dumpbase regex_arm_bug.i -march=armv5te
-marm -mthumb-interwork -mfloat-abi=soft -mlittle-endian -mthumb
-mtls-dialect=gnu -auxbase-strip foo.o -g -Os -Wall -Wstrict-prototypes
-Wstrict-aliasing -std

[Bug rtl-optimization/59858] [4.8/4.9 Regression] ICE: assign_by_spills, at lra-assigns.c:1283

2014-01-17 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59858

--- Comment #1 from Bernhard Reutner-Fischer  ---
Created attachment 31873
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31873&action=edit
slightly reduced


[Bug preprocessor/59805] invalid preprocessing directive not diagnosed with assembler-with-cpp

2014-10-01 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59805

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||joseph at codesourcery dot com

--- Comment #1 from Bernhard Reutner-Fischer  ---
CCing jsm.

I am undecided if this is a valid request after all.

On one hand this is not a valid preprocessing token, on the other hand this
behaviour might be ok with respect to ASM_COMMENT_START.

Thoughts?


[Bug c/68656] New: [4.8, 4.9, 5.0, 6.0 Regression] warning about disabled var-tracking uses odd location info

2015-12-02 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68656

Bug ID: 68656
   Summary: [4.8, 4.9, 5.0, 6.0 Regression] warning about disabled
var-tracking uses odd location info
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
CC: dodji at gcc dot gnu.org
  Target Milestone: ---

echo "/* This is a bugreport about using odd locations.  */" > bug.c
gcc -c bug.c -fvar-tracking -o /dev/null 
bug.c:1:0: warning: variable tracking requested, but useless unless producing
debug info
 /* This is a bugreport about using odd locations.  */
 ^

on stdin this looks like expected:
$ echo "/* This is a bugreport about using odd locations.  */" | gcc -xc -c -
-g -fvar-tracking -gtoggle -o /dev/null
:1:0: warning: variable tracking requested, but useless unless producing
debug info
$ 

Known to work: 4.7.4
$ gcc-4.7 -c bug.c -fvar-tracking -o /dev/null 
bug.c:1:0: warning: variable tracking requested, but useless unless producing
debug info [enabled by default]

Fails: 4.8.5
$ gcc-4.8 -c bug.c -fvar-tracking -o /dev/null 
bug.c:1:0: warning: variable tracking requested, but useless unless producing
debug info [enabled by default]
 /* This is a bugreport about using odd locations.  */
 ^

[Bug c/68656] [4.9/5/6 Regression] warning about disabled var-tracking uses odd location info

2015-12-02 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68656

--- Comment #2 from Bernhard Reutner-Fischer  ---
(In reply to Richard Biener from comment #1)
> Which version worked ok?  I think these warnings should simply not output

4.7.4 worked ok.
4.8.5 onward behave like current trunk a.k.a 6.0

> any location (well, as we now have per-function optimization settings such
> warning
> may apply only for certain functions...)

If it's per-function, it'd be ok to output the location, i'd say.
For file-scope it doesn't make sense to me.

thanks,

[Bug jit/66054] bootstrap comparison failure with --enable-host-shared

2015-12-02 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66054

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug middle-end/65534] tailcall not optimized away

2015-12-02 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65534

--- Comment #3 from Bernhard Reutner-Fischer  ---
(In reply to Bernhard Reutner-Fischer from comment #2)
> (In reply to Jan Hubicka from comment #1)
> > > #ifndef OPTIMIZE_MANUALLY
> > > void setutent(void) {
> > > ((void)0);
> > > __setutent_unlocked();
> > > ((void)0);
> > > }
> > > #else
> > > extern __typeof (__setutent_unlocked) setutent
> > > __attribute__ ((alias ("__setutent_unlocked")));
> > > #endif
> > 
> > I do not think GCC can safely optimize this, becuase in the first
> > case &setutent != &__setutent_unlocked, wile in the optimized
> > case the addresses are equal.
> 
> Note that __setutent_unlocked is static, so i don't see how this specific
> case would prevent optimization?

gcc-6 stage1 passed.
Honza, please explain how'd that prevent optimization?

[Bug middle-end/66741] New: loops not fused nor vectorized

2015-07-02 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66741

Bug ID: 66741
   Summary: loops not fused nor vectorized
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
Blocks: 53947
  Target Milestone: ---

I would have hoped that the strcpy loop and &~0x20 loop would be fused,
perusing some masked store for the tolower.

$ cat > strcpy.c <
#include 
int main(void) {
char src[128], dest[128];
int n = read(0, &src, sizeof(src));
if (n < 1)
return 1;
src[n] = 0;
tolower_strcpy(dest, src);
write(2, dest, strlen(dest));
return 0;
}
#endif
EOF

gcc-5 -S strcpy.c -o strcpy.s -Ofast -fomit-frame-pointer
-minline-all-stringops -mstringop-strategy=unrolled_loop -mtune=ivybridge


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations


[Bug middle-end/66741] loops not fused nor vectorized

2015-07-02 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66741

--- Comment #1 from Bernhard Reutner-Fischer  ---
i.e. maybe something more along the lines of

$ cat <
#include 
#include 

void
sse_tolower_strcpy (const char *d, const char *s)
{

  __m128i ranges =
_mm_setr_epi8 ('A', 'Z', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

  __m128i *src = (__m128i *) s;
  __m128i *dst = (__m128i *) d;
  const __m128i diff = _mm_set1_epi8 (0x20);

  const uint8_t mode = _SIDD_UBYTE_OPS | _SIDD_CMP_RANGES | _SIDD_UNIT_MASK;

  for (;; src++, dst++)
{

  const __m128i chunk = _mm_loadu_si128 (src);
  if (_mm_cmpistrc (ranges, chunk, mode))
{

  const __m128i tmp1 = _mm_cmpistrm (ranges, chunk, mode);
  const __m128i mask = _mm_and_si128 (tmp1, diff);

  _mm_storeu_si128 (dst, _mm_xor_si128 (chunk, mask));
}

  if (_mm_cmpistrz (ranges, chunk, mode))
break;
}
}

#ifdef MAIN
#include 
#include 
int main(void) {
char src[128], dest[128];
int n = read(0, &src, sizeof(src));
if (n < 1)
 1;
src[n] = 0;
sse_tolower_strcpy(dest, src);
write(2, dest, strlen(dest));
return 0;
}
#endif
EOF

.file   ""
.section.text.unlikely,"ax",@progbits
.LCOLDB2:
.text
.LHOTB2:
.p2align 4,,15
.globl  sse_tolower_strcpy
.type   sse_tolower_strcpy, @function
sse_tolower_strcpy:
.LFB641:
.cfi_startproc
movdqa  .LC0(%rip), %xmm2
movdqa  .LC1(%rip), %xmm3
jmp .L4
.p2align 4,,10
.p2align 3
.L2:
pcmpistrm   $68, %xmm1, %xmm2
je  .L1
.L9:
addq$16, %rsi
addq$16, %rdi
.L4:
movdqu  (%rsi), %xmm1
pcmpistrm   $68, %xmm1, %xmm2
jnc .L2
pand%xmm3, %xmm0
pxor%xmm1, %xmm0
movups  %xmm0, (%rdi)
pcmpistrm   $68, %xmm1, %xmm2
jne .L9
.L1:
rep ret
.cfi_endproc
.LFE641:
.size   sse_tolower_strcpy, .-sse_tolower_strcpy
.section.text.unlikely
.LCOLDE2:
.text
.LHOTE2:
.section.rodata.cst16,"aM",@progbits,16
.align 16
.LC0:
.byte   65
.byte   90
.byte   0
.byte   0
.byte   0
.byte   0
.byte   0
.byte   0
.byte   0
.byte   0
.byte   0
.byte   0
.byte   0
.byte   0
.byte   0
.byte   0
.align 16
.LC1:
.quad   2314885530818453536
.quad   2314885530818453536
.ident  "GCC: (Debian 5.1.1-12) 5.1.1 20150622"
.section.note.GNU-stack,"",@progbits


This would be *much* smaller and supposedly is also faster:
   textdata bss dec hex filename
228   0   0 228  e4 comment0.o
153   0   0 153  99 comment1.o


[Bug middle-end/66741] loops not fused nor vectorized

2015-07-09 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66741

--- Comment #4 from Bernhard Reutner-Fischer  ---
Created attachment 35940
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35940&action=edit
Manually expanded variant

expanding builtins early should arrive at that


[Bug middle-end/66741] loops not fused nor vectorized

2015-07-09 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66741

--- Comment #5 from Bernhard Reutner-Fischer  ---
Created attachment 35941
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35941&action=edit
Variant perusing builtins

This is (essentially) the motivating real-world example


[Bug middle-end/66741] loops not fused nor vectorized

2015-07-09 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66741

--- Comment #6 from Bernhard Reutner-Fischer  ---
Created attachment 35942
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35942&action=edit
Variant demonstrating strcpy+tolower fused loop, vectorized, SSE4.x

Code like this should be emitted for such strcpy+tolower "patterns" (on
SSE4.x), like for the motivating -1.c


[Bug middle-end/66741] loops not fused nor vectorized

2015-07-09 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66741

--- Comment #7 from Bernhard Reutner-Fischer  ---
folding tolower (and toupper while at it) gives:

for i in 0 1 2;do
gcc -o tolower_strcpy-$i tolower_strcpy-$i.c -Ofast -W -Wall -Wextra -pedantic
-DMAIN -msse4.2
done

/tmp/inp is 200MB random binary data (flash video)
gcc (Debian 4.9.2-22) 4.9.2:
for j in 0 1 2;do echo "# tolower_strcpy-$j"; time for i in $(seq 1 10);do
./tolower_strcpy-$j < /tmp/inp;done;done
# tolower_strcpy-0

real0m6.237s
user0m3.268s
sys 0m2.956s
# tolower_strcpy-1

real0m7.776s
user0m4.896s
sys 0m2.856s
# tolower_strcpy-2

real0m3.578s
user0m0.760s
sys 0m2.800s


gcc-5 (Debian 5.1.1-12) 5.1.1 20150622
# tolower_strcpy-0

real0m6.061s
user0m3.196s
sys 0m2.856s
# tolower_strcpy-1

real0m7.737s
user0m4.872s
sys 0m2.844s
# tolower_strcpy-2

real0m3.562s
user0m0.708s
sys 0m2.840s

gcc (GCC) 6.0.0 20150703 (experimental) [sibcall-elim revision
9e8ac6a:b79ca3b:17a501138f5bad51638cd4bbb290dffd9978b706] +
fold_builtin_tolower

# tolower_strcpy-0

real0m6.019s
user0m3.148s
sys 0m2.852s
# tolower_strcpy-1

real0m5.360s
user0m2.480s
sys 0m2.856s
# tolower_strcpy-2

real0m3.559s
user0m0.776s
sys 0m2.764s

But it's a complete mystery how to generate any sensible SSE4.x for the
tolower_strcpy-0 code. I'd had hoped that the loops would magically end up
using some fast sse4.2 but -Ofast -msse4.2 is not enough?


[Bug middle-end/65534] tailcall not optimized away

2015-07-09 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65534

--- Comment #2 from Bernhard Reutner-Fischer  ---
(In reply to Jan Hubicka from comment #1)
> > #ifndef OPTIMIZE_MANUALLY
> > void setutent(void) {
> > ((void)0);
> > __setutent_unlocked();
> > ((void)0);
> > }
> > #else
> > extern __typeof (__setutent_unlocked) setutent
> > __attribute__ ((alias ("__setutent_unlocked")));
> > #endif
> 
> I do not think GCC can safely optimize this, becuase in the first
> case &setutent != &__setutent_unlocked, wile in the optimized
> case the addresses are equal.

Note that __setutent_unlocked is static, so i don't see how this specific case
would prevent optimization?


[Bug c/48843] New: ICE in dwarf2out_var_location, at dwarf2out.c:22585

2011-05-02 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48843

   Summary: ICE in dwarf2out_var_location, at dwarf2out.c:22585
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: al...@gcc.gnu.org


mips-oe-linux-uclibc-gcc -march=mips32 -pthread -fexpensive-optimizations
-fomit-frame-pointer -frename-registers -Os -pipe -g -c mem-overflow.7.i -o
foo.o
mem-overflow.7.i: In function 'main':
mem-overflow.7.i:21:1: internal compiler error: in dwarf2out_var_location, at
dwarf2out.c:22585
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
{standard input}: Assembler messages:
{standard input}:64: Warning: missing .end at end of assembly
{standard input}:64: Error: open CFI at the end of file; missing .cfi_endproc
directive
b@nbbrf:/scratch/obj.x86_64/reduce$ cat mem-overflow.7.i 
#pragma GCC optimize (1)
typedef int gint;
typedef unsigned long gulong;
struct _GTimeVal
{
};
g_bit_nth_lsf (gulong mask,
gint nth_bit)
{
union
  {
 struct
   {
   } _sigpoll;
 } __sigaction_handler;
};
main (int argc,
  char *argv[])
{
  return g_test_run();
}





trunk r173242,

mips-oe-linux-uclibc-gcc -v
Using built-in specs.
COLLECT_GCC=mips-oe-linux-uclibc-gcc
COLLECT_LTO_WRAPPER=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips/libexec/gcc/mips-oe-linux-uclibc/4.7.0/lto-wrapper
Target: mips-oe-linux-uclibc
Configured with:
/scratch/obj.x86_64/oe/build/tmp/work/mips-oe-linux-uclibc/gcc-cross-4.6+svnr173242-r1.1/trunk/configure
--build=x86_64-linux --host=x86_64-linux --target=mips-oe-linux-uclibc
--prefix=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips
--exec_prefix=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips
--bindir=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips/bin
--sbindir=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips/bin
--libexecdir=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips/libexec
--datadir=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips/share
--sysconfdir=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/etc
--sharedstatedir=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/com
--localstatedir=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/var
--libdir=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips/lib
--includedir=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips/include
--oldincludedir=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips/include
--infodir=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips/share/info
--mandir=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips/share/man
--with-libtool-sysroot --disable-largefile --disable-ipv6 --disable-nls
--enable-clocale=generic --with-gnu-ld --enable-shared --enable-languages=c,c++
--enable-threads=posix --disable-multilib --enable-c99 --enable-long-long
--enable-symvers=gnu --enable-libstdcxx-pch
--program-prefix=mips-oe-linux-uclibc- --enable-target-optspace --enable-libssp
--disable-bootstrap --disable-libgomp --disable-libmudflap
--with-sysroot=/scratch/obj.x86_64/oe/build/tmp/sysroots/mips-oe-linux-uclibc
--with-build-sysroot=/scratch/obj.x86_64/oe/build/tmp/sysroots/mips-oe-linux-uclibc
--with-build-time-tools=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux/mips/bin
--disable-libunwind-exceptions
--with-mpfr=/scratch/obj.x86_64/oe/build/tmp/sysroots/x86_64-linux
--with-system-zlib --disable-decimal-float
--program-prefix=mips-oe-linux-uclibc- --disable-__cxa_atexit --disable-nls
Thread model: posix
gcc version 4.7.0 20110502 (experimental) (GCC)


[Bug debug/48843] ICE in dwarf2out_var_location, at dwarf2out.c:22585 with pragma GCC optimize

2011-05-05 Thread aldot at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48843

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Target||mips-linux-gnu
 CC||echristo at apple dot com,
   ||rdsandiford at googlemail
   ||dot com

--- Comment #1 from Bernhard Reutner-Fischer  
2011-05-05 10:33:28 UTC ---
jakub: most likely mips backend reshuffles stuff after var-tracking; if it does
so, it needs to be fixed not to insert anything in between a call and following
call arg note
jakub: see http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171156 for
corresponding s390 fix, http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171185
for sh, http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171193 for arm fix


[Bug c/103104] New: missing warning about superfluous forward declaration -Wsuperfluous-forward-declaration

2021-11-05 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103104

Bug ID: 103104
   Summary: missing warning about superfluous forward declaration
-Wsuperfluous-forward-declaration
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
  Target Milestone: ---

It would be nice to have a -Wextra to warn about superfluous forward
declarations.

Random example from gcc/incpath.c
static void add_env_var_paths (const char *, incpath_kind);
static void add_standard_paths (const char *, const char *, const char *, int);
static void free_path (struct cpp_dir *, int);
static void merge_include_chains (const char *, cpp_reader *, int);
static void add_sysroot_to_chain (const char *, int);
static struct cpp_dir *remove_duplicates (cpp_reader *, struct cpp_dir *,
  struct cpp_dir *, struct cpp_dir *,
--
static void
free_path (struct cpp_dir *path, int reason)
--
static void
add_env_var_paths (const char *env_var, incpath_kind chain)
--
static void
add_standard_paths (const char *sysroot, const char *iprefix,
--
static struct cpp_dir *
remove_duplicates (cpp_reader *pfile, struct cpp_dir *head,
--
...
All definitions are in topologically correct order, i.e. defined before used,
each and every forward declaration is redundant and error prone.

Maybe there is an existing plugin to that effect?

[Bug fortran/103112] New: ICE in gfc_get_descriptor_field for gfortran.dg/coarray_alloc_comp_4.f08 caf single

2021-11-06 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103112

Bug ID: 103112
   Summary: ICE in gfc_get_descriptor_field for
gfortran.dg/coarray_alloc_comp_4.f08 caf single
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
  Target Milestone: ---

gfortran.dg/coarray_alloc_comp_4.f08 compiles fine with -fcoarray=lib
but ICEs with -fcoarray=single in pristine trunk


$ gfortran -O2 -fcoarray=single -g -g3 -ggdb3 -fdump-tree-original
-fdump-tree-optimized coarray_alloc_comp_4.f08 -c; echo $?
coarray_alloc_comp_4.f08:38:22:

   38 |   deallocate(obj%link)
  |  1
internal compiler error: in gfc_get_descriptor_field, at
fortran/trans-array.c:245
0x67b8e8 gfc_get_descriptor_field
../../../src/gcc-12.orig/gcc/fortran/trans-array.c:245
0x97d53a gfc_conv_descriptor_data_get(tree_node*)
../../../src/gcc-12.orig/gcc/fortran/trans-array.c:264
0x97aa64 gfc_deallocate_with_status(tree_node*, tree_node*, tree_node*,
tree_node*, tree_node*, bool, gfc_expr*, int, tree_node*, tree_node*)
../../../src/gcc-12.orig/gcc/fortran/trans.c:1427
0x98e539 structure_alloc_comps
../../../src/gcc-12.orig/gcc/fortran/trans-array.c:9291
0x9904da gfc_deallocate_alloc_comp(gfc_symbol*, tree_node*, int, int)
../../../src/gcc-12.orig/gcc/fortran/trans-array.c:10081
0x97b196 gfc_deallocate_scalar_with_status(tree_node*, tree_node*, tree_node*,
bool, gfc_expr*, gfc_typespec, bool)
../../../src/gcc-12.orig/gcc/fortran/trans.c:1646
0xa1189d gfc_trans_deallocate(gfc_code*)
../../../src/gcc-12.orig/gcc/fortran/trans-stmt.c:7380
0x977597 trans_code
../../../src/gcc-12.orig/gcc/fortran/trans.c:2092
0x9a9c2f gfc_generate_function_code(gfc_namespace*)
../../../src/gcc-12.orig/gcc/fortran/trans-decl.c:7666
0x9220ee translate_all_program_units
../../../src/gcc-12.orig/gcc/fortran/parse.c:6629
0x9220ee gfc_parse_file()
../../../src/gcc-12.orig/gcc/fortran/parse.c:6916
0x97434f gfc_be_parse_file
../../../src/gcc-12.orig/gcc/fortran/f95-lang.c:216
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
1
$ gfortran --version
GNU Fortran (GCC) 12.0.0 20211105 (experimental) [master r12-4967-gbcf3728abe8]

[Bug middle-end/103102] [12 Regression] pr81175.f fails since r12-4946-ga79fe53d6ce6074d083e925b6b19773e45817405

2021-11-06 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103102

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org

--- Comment #1 from Bernhard Reutner-Fischer  ---
maybe related:
polyhedron capacita with pristine r12-4967 on 86_64 skylake

$ gfortran -march=native -ffast-math -ftree-vectorize -funroll-loops -O3
capacita.f90 -o capacita.exe
during RTL pass: expand
capacita.f90:609:21:

  609 |   Grid(i,j)=0
  | ^
internal compiler error: in maybe_gen_insn, at optabs.c:7871
0x72b7a6 maybe_gen_insn(insn_code, unsigned int, expand_operand*)
../../../src/gcc-12.orig/gcc/optabs.c:7871
0xe1d738 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
../../../src/gcc-12.orig/gcc/optabs.c:7915
0xe1d738 expand_insn(insn_code, unsigned int, expand_operand*)
../../../src/gcc-12.orig/gcc/optabs.c:7946
0xcb3bcf expand_partial_store_optab_fn
../../../src/gcc-12.orig/gcc/internal-fn.c:2773
0xa6f487 expand_call_stmt
../../../src/gcc-12.orig/gcc/cfgexpand.c:2749
0xa6f487 expand_gimple_stmt_1
../../../src/gcc-12.orig/gcc/cfgexpand.c:3876
0xa6f487 expand_gimple_stmt
../../../src/gcc-12.orig/gcc/cfgexpand.c:4040
0xa7536f expand_gimple_basic_block
../../../src/gcc-12.orig/gcc/cfgexpand.c:6085
0xa76df6 execute
../../../src/gcc-12.orig/gcc/cfgexpand.c:6811
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

[Bug middle-end/103102] [12 Regression] pr81175.f fails since r12-4946-ga79fe53d6ce6074d083e925b6b19773e45817405

2021-11-06 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103102

--- Comment #2 from Bernhard Reutner-Fischer  ---
gfortran.dg/pr101267.f90 ICEs similar to gfortran.dg/pr81175.f

[Bug fortran/68800] Fortran FE produces many memory leaks

2021-11-09 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68800

--- Comment #6 from Bernhard Reutner-Fischer  ---
at least a few down with r12-5073:

 == LEAK SUMMARY:
-==definitely lost: 9,471 bytes in 14 blocks
-==indirectly lost: 18,267 bytes in 364 blocks
+==definitely lost: 6,472 bytes in 8 blocks
+==indirectly lost: 15,683 bytes in 346 blocks
 ==  possibly lost: 0 bytes in 0 blocks
 ==still reachable: 1,442,175 bytes in 1,244 blocks
 == suppressed: 0 bytes in 0 blocks
 == 
 == For lists of detected and suppressed errors, rerun with: -s
-== ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)
+== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)

[Bug fortran/101919] Inconsistent -Wstringop-overread warning with -flto

2021-11-09 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101919

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org

--- Comment #3 from Bernhard Reutner-Fischer  ---
if c does not contain trailing blank characters then
len_trim(c) can return up to 100, yes.
So the warning would be correct in this case as it would read beyond c (at
least in C).

Coding error?

if (c(1:12) == 'Accumulated ') c = c(13:len_trim(c))
should maybe subtract about 13 from the upper bound of the right hand side?

[Bug fortran/102043] Wrong array types used for negative stride accesses

2021-11-10 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102043

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org

--- Comment #9 from Bernhard Reutner-Fischer  ---
yes i've been looking into that too and it seems rather involved to switch the
addressing away from array_ref.

[Bug fortran/83646] (PDT) Use statement with PDTs excludes the specific instances.

2021-11-12 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83646

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org

--- Comment #2 from Bernhard Reutner-Fischer  ---
Seems to compile with 10.3.0 and 11.2.0

$ gfortran-10 -c /tmp/pr83646.f90 -o /tmp/pr.o -W -Wall -Wextra
-fdump-tree-original && gfortran-10 --version | head -n1
/tmp/pr.f90:10:20:

   10 |subroutine sub( a )
  |1
Warning: Unused dummy argument ‘a’ at (1) [-Wunused-dummy-argument]
GNU Fortran (Debian 10.3.0-11) 10.3.0

[Bug fortran/102043] Wrong array types used for negative stride accesses

2021-11-14 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102043

--- Comment #16 from Bernhard Reutner-Fischer  ---
In addition to comment #1
here's an excerpt of an existing test with just one dimension:

$ cat f_pr86389.f90
! PR 19239.  Check for various kinds of vector subscript.  In this test,
! all vector subscripts are indexing single-dimensional arrays.
! { dg-do run }
program main
  implicit none
  integer, parameter :: n = 10
  integer :: i
  integer, dimension (n) :: a, b, idx, id

  idx = (/ 3, 1, 5, 2, 4, 10, 8, 7, 6, 9 /)
  id = (/ (i, i = 1, n) /)
  b = (/ (i * 100, i = 1, n) /)

  a = 0
  a (idx (10:6:-2)) = b (idx (1:7:3))
write(*,*) "#i   =", id
write(*,*) "idx  =", idx
write(*,*) "now a=", a
write(*,*) "now b=", b
write(*,*) "a idx(10:6:-2)=", idx (10:6:-2)
write(*,*) "b idx(1:7:3)  =", idx (1:7:3)
  call test (idx (10:6:-2), idx (1:7:3))

contains
  subroutine test (lhs, rhs)
integer, dimension (:) :: lhs, rhs
integer :: i
!!!if (size (lhs, 1) .ne. size (rhs, 1)) STOP 11
!do i = 1, size (lhs, 1)
do i = 1, 3 ! spare us the code for size(), fixed const
  if (a (lhs (i)) .ne. b (rhs (i))) STOP 12
end do
!a = 0
  end subroutine test
end program main

[Bug fortran/102043] Wrong array types used for negative stride accesses

2021-11-14 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102043

--- Comment #17 from Bernhard Reutner-Fischer  ---
Do we want to address arrays always at position 0 (maybe to help graphite ?) or
would it be sufficient to just not dereference the array "before" the first
position like Mikael suggests in comment #14?

gfc_conv_expr_descriptor has this
  if (se->data_not_needed)
gfc_conv_descriptor_data_set (&loop.pre, parm,
  gfc_index_zero_node);
  else
/* Point the data pointer at the 1st element in the section.  */
gfc_get_dataptr_offset (&loop.pre, parm, desc, base,
subref_array_target, expr);

  gfc_conv_descriptor_offset_set (&loop.pre, parm, offset);

where base is (for "section"-addressing) 9 for the testcase in comment #16 as
can be seen in Richard's initial report.

[Bug fortran/47720] problems with makefile dependency generation using -M

2021-11-21 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47720

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org

--- Comment #9 from Bernhard Reutner-Fischer  ---
To avoid the duplicate module names, we would have to remember which modules we
emitted already (or maybe deps_add_ not when opening and reading the module but
way later).

But, as said, is this really a problem?

As to the fact that -M... requires cpp, we could enable cpp when seeing -M,
yes.
I'm not sure about the implications this has on the source we're reading
though. Maybe none.

[Bug middle-end/102519] [12 Regression] VRP Jump threader memory explosion

2021-09-29 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102519

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org

--- Comment #19 from Bernhard Reutner-Fischer  ---
so as asked in
https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580485.html what about
dominance_info?

[Bug fortran/102973] New: possible inconsistency in procptr_assignment handling when matching ASSOCIATE

2021-10-27 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102973

Bug ID: 102973
   Summary: possible inconsistency in procptr_assignment handling
when matching ASSOCIATE
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
  Target Milestone: ---

As noted in https://gcc.gnu.org/pipermail/fortran/2018-September/050809.html

i spotted one
(pre-existing) possible inconsistency that i did overlook back then:

gfc_match_associate () reads
...
  if (gfc_match (" %e", &newAssoc->target) != MATCH_YES)
{
  /* Have another go, allowing for procedure pointer selectors.  */
  gfc_matching_procptr_assignment = 1;
  if (gfc_match (" %e", &newAssoc->target) != MATCH_YES)
{
  gfc_error ("Invalid association target at %C");
  goto assocListError;
}
  gfc_matching_procptr_assignment = 0;
}

i.e. we retry a match, but in the second attempt we turn on procptr
assignment matching and if that works, we turn procptr assignment
matching off again.
But if we fail that retry, we forget to turn it off again.
I suppose we should:

$ svn diff -x -p gcc/fortran/match.c
Index: gcc/fortran/match.c
===
--- gcc/fortran/match.c (revision 264040)
+++ gcc/fortran/match.c (working copy)
@@ -1898,13 +1898,16 @@ gfc_match_associate (void)
   if (gfc_match (" %e", &newAssoc->target) != MATCH_YES)
  {
/* Have another go, allowing for procedure pointer selectors.  */
+   match m;
+
gfc_matching_procptr_assignment = 1;
-   if (gfc_match (" %e", &newAssoc->target) != MATCH_YES)
+   m = gfc_match (" %e", &newAssoc->target);
+   gfc_matching_procptr_assignment = 0;
+   if (m != MATCH_YES)
  {
gfc_error ("Invalid association target at %C");
goto assocListError;
  }
-   gfc_matching_procptr_assignment = 0;
  }
   newAssoc->where = gfc_current_locus;


Untested. Maybe someone wants to give it a whirl...
If it wrecks havoc then leaving it set deliberately deserves at least a
comment.

PS: It would be nice to get rid of gfc_matching_procptr_assignment,
gfc_matching_ptr_assignment, gfc_matching_prefix, FWIW.

[Bug fortran/103001] New: missing simplify of (CAF) get_team

2021-10-29 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103001

Bug ID: 103001
   Summary: missing simplify of (CAF) get_team
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
  Target Milestone: ---

As noted here:
https://gcc.gnu.org/pipermail/fortran/2021-October/056793.html
---8<---
- delete unused gfc_simplify_get_team or wire it up in intrinsics,
  get_team handling (instead of the NULL..)

Anyone who does coarrays might want to fill in the missing get_team()
simplify and add an appropriate test. 
---8<---
E.g. omp team is named properly.
It would have been nice if caf would have used a _caf part for it's functions
internally throughout too.

[Bug fortran/98426] find_symbol in module.c traverses O(N) part of a search tree

2021-10-29 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98426

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org

--- Comment #4 from Bernhard Reutner-Fischer  ---
I'm thinking about switching all these symbol lookups/symtree traversals (i.e.
the whole fortran frontend) to pointer comparison which should _greatly_
speedup any symbol lookup, fyi.

[Bug fortran/99884] Double spaces in warning message

2021-10-31 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99884

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

   Keywords||patch
 Ever confirmed|0   |1
   Last reconfirmed||2021-10-31
 CC||aldot at gcc dot gnu.org
URL||https://gcc.gnu.org/piperma
   ||il/gcc-patches/2021-October
   ||/582974.html
 Status|UNCONFIRMED |NEW

--- Comment #1 from Bernhard Reutner-Fischer  ---
Confirmed.

[Bug fortran/100972] Missing error with "implicit none (external)"

2021-10-31 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100972

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Keywords||patch
   Last reconfirmed||2021-10-31
 CC||aldot at gcc dot gnu.org
URL||https://gcc.gnu.org/piperma
   ||il/gcc-patches/2021-October
   ||/582979.html

--- Comment #2 from Bernhard Reutner-Fischer  ---
Confirmed

[Bug fortran/100991] [OpenMP] firstprivate for optional arguments is mishandled

2021-10-31 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100991

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
 CC||aldot at gcc dot gnu.org
   Last reconfirmed||2021-10-31

[Bug fortran/101337] gfortran doesn't diagnose all operands with constraint violations

2021-10-31 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101337

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

   Keywords||patch
URL||https://gcc.gnu.org/piperma
   ||il/gcc-patches/2021-October
   ||/582983.html
 CC||aldot at gcc dot gnu.org
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2021-10-31

--- Comment #2 from Bernhard Reutner-Fischer  ---
confirmed

[Bug fortran/100972] Missing error with "implicit none (external)"

2022-11-14 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100972

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
  Known to work||12.1.0

--- Comment #4 from Bernhard Reutner-Fischer  ---
Fixed for 12.1.0 onwards.

[Bug bootstrap/107739] New: --enable-languages= duplicates yield odd error

2022-11-17 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107739

Bug ID: 107739
   Summary: --enable-languages= duplicates yield odd error
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
  Target Milestone: ---

Mere cosmetics, but the error is contradicting it's own hint in a confusing
way.

$ ../../src/gcc-13.mine/configure --enable-languages=c++,lto,lto
configure: error: 
The following requested languages could not be built: lto
Supported languages are: c,c,c++,fortran,go,lto,objc,obj-c++

or other dups like
$ ../../src/gcc-13.mine/configure --enable-languages=c++,c++,lto
configure: error: 
The following requested languages could not be built: c++
Supported languages are: c,c,c++,fortran,go,lto,objc,obj-c++

I'm not sure why duplicates are not ignored silently.

[Bug middle-end/107743] New: expmed: extract_bit_field_1: maybe-uninitialized warning

2022-11-17 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107743

Bug ID: 107743
   Summary: expmed: extract_bit_field_1: maybe-uninitialized
warning
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
  Target Milestone: ---

current trunk around r13-4134

/scratch/obj.x86_64/gcc-13.mine/./prev-gcc/xg++
-B/scratch/obj.x86_64/gcc-13.mine/./prev-gcc/
-B/opt/x86_64/gcc-13.mine/x86_64-pc-linux-gnu/bin/ -nostdinc++
-B/scratch/obj.x86_64/gcc-13.mine/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-B/scratch/obj.x86_64/gcc-13.mine/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs

-I/scratch/obj.x86_64/gcc-13.mine/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu

-I/scratch/obj.x86_64/gcc-13.mine/prev-x86_64-pc-linux-gnu/libstdc++-v3/include
 -I/scratch/src/gcc-13.mine/libstdc++-v3/libsupc++
-L/scratch/obj.x86_64/gcc-13.mine/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/scratch/obj.x86_64/gcc-13.mine/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs
 -fno-PIE -c   -O2 -g3 -ggdb3 -gdwarf-5 -pipe -fno-checking -gtoggle -DIN_GCC  
  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I.
-I../../../src/gcc-13.mine/gcc -I../../../src/gcc-13.mine/gcc/.
-I../../../src/gcc-13.mine/gcc/../include
-I../../../src/gcc-13.mine/gcc/../libcpp/include
-I../../../src/gcc-13.mine/gcc/../libcody 
-I../../../src/gcc-13.mine/gcc/../libdecnumber
-I../../../src/gcc-13.mine/gcc/../libdecnumber/bid -I../libdecnumber
-I../../../src/gcc-13.mine/gcc/../libbacktrace   -o expmed.o -MT expmed.o -MMD
-MP -MF ./.deps/expmed.TPo ../../../src/gcc-13.mine/gcc/expmed.cc

../../../src/gcc-13.mine/gcc/expmed.cc: In function 'rtx_def*
extract_bit_field_1(rtx, poly_uint64, poly_uint64, int, rtx, machine_mode,
machine_mode, bool, bool, rtx_def**)':
../../../src/gcc-13.mine/gcc/expmed.cc:1838:45: warning: '*(unsigned
int*)((char*)&imode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))' may
be used uninitialized [-Wmaybe-uninitialized]
 1838 |   rtx sub = extract_bit_field_as_subreg (mode1, op0, imode,
  | ^~~
 1839 |  bitsize, bitnum);
  |  
../../../src/gcc-13.mine/gcc/expmed.cc:1798:19: note: '*(unsigned
int*)((char*)&imode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))' was
declared here
 1798 |   scalar_int_mode imode;
  |   ^

[Bug middle-end/107743] expmed: extract_bit_field_1: maybe-uninitialized warning

2022-11-19 Thread aldot at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107743

--- Comment #2 from Bernhard Reutner-Fischer  ---
--disable-werror --enable-checking=yes --enable-debug --enable-multilib
--disable-libstdcxx-pch --enable-bootstrap

  1   2   >